コンテンツにスキップ

一時的なコードスキャン (Ephemeral Code Scanning)

結果をファイルに書き出す、1 回限りのスタンドアロン SAST & 依存関係スキャンを実行するには、次のようなコマンドを実行します。

./aikido-local-scan ephemeral-scan path_to_your_repo --apikey AIK_CI_xxx

これにより、検出結果が aikido-scan-results.json ファイルに書き込まれます。

すべての CLI オプション:

Usage: aikido-local-scanner ephemeral-scan [options] <path>
Run a scan that outputs results to a JSON file. BETA: supports SAST and dependency scanning.
Arguments:
path The path you want to scan.
Options:
--apikey <apikey> Apikey to process scan results. (env: AIKIDO_API_KEY)
--repositoryname <repositoryname> Aikido repository name to validate the scan results against. (default: "")
--tmpdirectory <tmpdirectory> Temporary directory to use during scanning. (default: "./.aikidotmp-1783353891564")
--debug Add additional debug information to command output.
--exclude <exclude_path> Specify a file or folder path that should be excluded from the scan. This option may be specified multiple times. (default: [])
--result-output <output> JSON file to write issues to. (default: "./aikido-scan-results.json")
--scan-types [types...] Specify which types of scans should be executed. (choices: "code", "dependencies", default: ["code","dependencies"])
--scan-timeout <timeout> Timeout in milliseconds for each scan (defaults to 900000ms).
--enable-proxy Uses HTTPS_PROXY environment variable to proxy requests
--ca-bundle <path> Path to a PEM file containing custom root CA(s) to trust when using --enable-proxy. (env: AIKIDO_CA_BUNDLE)
--include-dev-deps Enable scanning of development dependencies (e.g., devDependencies in package.json, etc.)
-h, --help display help for command

以下は、よくある利用ケースの設定例です。

依存関係スキャンのみを実行したい場合

aikido-local-scanner ephemeral-scan ./
--apikey AIK_CI_xxx
--scan-types dependencies

コードスキャンのみを実行したい場合

aikido-local-scanner ephemeral-scan ./
--apikey AIK_CI_xxx
--scan-types code