Documentation
First scan
Run NgBastion on an Angular workspace, understand the output and choose a security gate.
From the root of an Angular workspace (the folder with angular.json):
ngbastion scanNgBastion discovers projects from angular.json and uses each project's tsConfig. Without angular.json it uses tsconfig.json; without that, it analyzes every .ts file in the folder. Use --project <name> to limit a monorepo scan.
With no configuration file, the recommended preset applies: every rule is enabled, findings below medium confidence are hidden, and the gate fails on high or worse.
The output
Each finding shows:
- severity, rule ID, rule name, confidence and how the finding was established (
dataflow,patternorheuristic); - the location and the source line;
- the message;
- for data-flow findings, the trace from source to sink;
- a one-line fix and the
ngbastion explain <ID>command for details.
The summary lists counts per severity, suppressed findings and how many lower-confidence findings were hidden. The final line states the gate result. Diagnostics — for example csp-not-assessed or analysis-incomplete — tell you where the analysis was partial.
Useful next commands
ngbastion scan --min-confidence low # include low-confidence findingsngbastion scan --verbose # evidence and informational diagnosticsngbastion explain NGB001 # full documentation of a rulengbastion init # create a configuration fileSee the CLI reference for every option and exit code.