Install
Install once on a workstation or CI runner.
npm install -g cognium-ai cognium-ai --help
Start with the cognium-ai CLI, then connect staging CI when generated pull requests need semantic SAST, verification evidence, and policy control.
Install the cognium-ai CLI from npm, run it against a directory, and choose the output format that matches your workflow. Start locally, then move the same command into pull requests once the signal looks right.
Install once on a workstation or CI runner.
npm install -g cognium-ai cognium-ai --help
Point the scanner at source, a service folder, or the repo root.
cognium-ai scan ./src cognium-ai scan .
Generate SARIF for GitHub code scanning and security review tools.
cognium-ai scan ./src \ --format sarif \ -o results.sarif
The useful pattern is simple: scan broadly during local development, export SARIF for pull requests, run trust and quality checks when needed, and use severity thresholds only when the team is ready to block merges.
# report high severity findings and above cognium-ai scan ./src --severity high # trust and quality scores cognium-ai trust ./src -f json -o trust.json cognium-ai quality ./src -f json -o quality.json # quiet mode for scripts and hooks cognium-ai scan . --severity critical -q # pre-commit gate if ! cognium-ai scan . --severity critical -q; then echo "Blocked: critical vulnerabilities found" exit 1 fi
The cognium-ai CLI also includes commands for generating Specifica specs, checking code-to-spec drift, initializing project config, and validating local setup before CI rollout.
Create Specifica documentation from source so generated code has a reviewable behavioral baseline.
cognium-ai generate-spec ./src --all
Compare code against the generated or curated spec and fail CI when alignment drops below threshold.
cognium-ai spec-diff ./src \ --threshold 70 \ --exit-code
Create config, verify LLM settings, and print component versions before promoting the scanner into CI.
cognium-ai init cognium-ai doctor cognium-ai version
For larger scans, use the built-in review bundles and JSONL streaming mode so results can be consumed incrementally by CI or downstream review systems.
# security-focused bundled review cognium-ai ./src --bundle security-review # stream machine-readable results cognium-ai ./src \ --stream-output out.jsonl \ --memory-efficient
Developers do not need another dashboard that only security can interpret. Cognium produces findings that map source to sink, explain the exploit path, and fit into existing code review tools.
Run scans before opening a pull request. Validate generated code while the context is still fresh.
Export SARIF, wire GitHub code scanning, and enforce branch policy without replacing your build system.
Model request sources, sanitizers, encoders, and sinks used by real application frameworks.
Start in report-only mode, then move selected repositories to blocking gates once the signal is tuned.
name: Cognium
on: [pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g cognium-ai
- run: cognium-ai scan . --format sarif -o cognium.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: cognium.sarifDeveloper adoption improves when the scanner understands local frameworks, wrappers, and safe helper APIs. Cognium supports source, sink, and sanitizer definitions that teams can evolve with the codebase.
sources:
- pattern: req.getParameter
- pattern: request.query
sinks:
- pattern: db.query
cwe: CWE-89
sanitizers:
- pattern: escapeHtml
- pattern: preparedStatementBefore a team adds any security gate, developers need proof that the tool is installable, inspectable, and reproducible. Cognium should make those checks obvious.
Install with npm and scan a repository before introducing CI policy or enterprise controls.
Open quickstartReview the scanner, CI examples, issues, and documentation before trusting generated-code findings.
View GitHubCheck the benchmark harness and raw methodology so adoption is based on evidence, not marketing claims.
View benchmarksCognium should be easy to try independently and straightforward to graduate into enterprise governance.
| Path | Best for | Next step |
|---|---|---|
| cognium-ai CLI | Developers validating semantic SAST locally or in public CI. | Install from npm and scan a repo. |
| GitHub Action | Teams that want SARIF in pull requests without workflow migration. | Add the workflow and run report-only first. |
| Enterprise pilot | Teams adopting coding agents across private repositories. | Connect one staging repo and tune policy thresholds. |
Start with the open-source tools, then connect one staging repository when you are ready to verify AI-generated pull requests in CI.