# data-code-extension script scan

Scan a data code extension script package for permissions and dependencies.

## Description

Scan the Python entrypoint file in an initialized data code extension script package to identify required permissions and dependencies. By default, this command updates `config.json` and `requirements.txt` based on the scan results.

## Examples

Scan with a custom entrypoint file:

```sh
sf data-code-extension script scan --entrypoint ./my-script-package/payload/entrypoint.py
```

Perform a dry run to preview the changes:

```sh
sf data-code-extension script scan --entrypoint ./my-script-package/payload/entrypoint.py --dry-run
```

Scan without updating `requirements.txt`:

```sh
sf data-code-extension script scan --entrypoint ./my-script-package/payload/entrypoint.py --no-requirements
```

## Flags

- `-e, --entrypoint <ENTRYPOINT>` (Optional): Path to the entrypoint Python file to scan.
- `--config-file <CONFIG-FILE>` (Optional): Path to an alternate configuration file.
- `-d, --dry-run` (Optional): Preview changes without modifying files.
- `-n, --no-requirements` (Optional): Skip updates to `requirements.txt`.
- `--flags-dir <FLAGS-DIR>` (Optional): Global flag that provides command flag values from files in a directory instead of passing them on the command line. Name each file in the directory after a supported flag of the command, without the ` --  ` prefix, and include the plain text value for that flag as its content. Omit required flags from the command line if they are satisfied through the directory.
