> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/code-scanning/local-code-scanning/ephemeral-code-scanning.md).

# Ephemeral Code Scanning

To run a one-time stand-alone SAST & dependencies scan that writes results to a file run a command like:

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

This will write findings to an `aikido-scan-results.json` file.\
\
All CLI options:

```
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

```

## Common use cases <a href="#common-use-cases" id="common-use-cases"></a>

Below you can find some example configurations of common use cases.\
\
I want to run only dependency scanning

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

I want to run only code scanning

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/code-scanning/local-code-scanning/ephemeral-code-scanning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
