code-scanning-report
v1.1.1
Published
Fetch GitHub code-scanning, Dependabot and secret-scanning alerts for a repository (via the GitHub CLI) and normalize them into a remediation report.
Readme
code-scanning-report
Fetch GitHub code-scanning, secret-scanning and Dependabot alerts (via the GitHub CLI), or compact a local Checkmarx SCA report, into a normalized JSON report.
Prerequisites
- Node.js 18 or later
- GitHub CLI (
gh), installed and authenticated. Not required when using--inputwith a local file.
Install gh:
# Windows
winget install GitHub.cli
# macOS
brew install gh
# Linux: see https://github.com/cli/cli/blob/trunk/docs/install_linux.mdThen authenticate:
gh auth loginInstall
npm install -g code-scanning-reportA post-install check prints a warning if gh is not found on PATH. It never fails the install.
Usage
code-scanning-report --help
code-scanning-report --version
code-scanning-report --repo owner/repo --type code-scanningThe code-scanning report also includes dependabot (Dependabot alerts) and malware (Dependabot malware alerts) sections when fetched from GitHub; a failed Dependabot fetch only prints a warning. Use --type dependabot for those alone.
code-scanning-report --repo owner/repo --type dependabot
code-scanning-report --type checkmarx --input report.json