dart_shield analyze
Run security analysis on your project.
dart_shield analyze
The analyze command runs the security analysis on your codebase. It is designed to be used both locally by developers and in CI/CD pipelines.
Usage
dart_shield analyze [path] [options]
[path]: The directory to analyze. Defaults to the current directory (.) if not specified.
Options
| Option | Abbreviation | Description | Default |
|---|---|---|---|
--reporter | -r | Defines the output format. Options: console (human-readable), json (machine-readable), both. | console |
--only | Run only the specified analyzers, ignoring configuration settings. Useful for targeted checks. | All enabled | |
--exclude | Exclude specific analyzers from the run. | None | |
--help | -h | Prints usage information. |
Analyzers
Currently, the main analyzer is code, which performs static code analysis for security flaws (hardcoded secrets, weak crypto, etc.).
CI/CD Integration (JSON Output)
Generate a JSON report for easy parsing by other tools:
dart_shield analyze --reporter json