Run agent-secret-guard in GitHub Actions to scan AI agent, MCP, and local automation repositories for risky secrets and permissions.
Languages: English | 简体中文
This wrapper action is intentionally small. The scanner source, rules, docs, and examples live in the main repository:
- Marketplace listing: https://github.com/marketplace/actions/agent-secret-guard
- Main repo: https://github.com/aolingge/agent-secret-guard
- npm package: https://www.npmjs.com/package/agent-secret-guard
- Fix guide: https://github.com/aolingge/agent-secret-guard/blob/main/docs/remediation.md
- Changelog: CHANGELOG.md
name: Agent Secret Guard on: pull_request: push: branches: [main] permissions: contents: read jobs: scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: persist-credentials: false - uses: aolingge/[email protected] with: path: . fail-on: high
| Input | Default | Description |
|---|---|---|
path |
. |
Directory or file to scan. |
fail-on |
high |
Lowest severity that should fail the action: low, medium, high, or critical. |
format |
text |
Output format: text, json, or sarif. |
output |
empty | Optional file path to write the report to. |
- uses: aolingge/[email protected] with: path: . fail-on: high format: sarif output: agent-secret-guard.sarif - uses: github/codeql-action/upload-sarif@v4 if: always() with: sarif_file: agent-secret-guard.sarif
Each action tag pins a specific agent-secret-guard npm package version inside action.yml. This keeps workflow runs reproducible.
To get scanner rule updates, upgrade the action tag after checking the wrapper changelog and the main scanner release notes.
- MCP tokens passed through command args.
- Hardcoded API and package tokens.
- Broad filesystem access in agent or automation configs.
- Browser profile and credential store exposure.
- Dangerous shell commands in agent instructions.
- Over-permissive GitHub Actions workflows.
Preparing to publish an AI agent, MCP server, or automation repo? Start with the main project's launch kit for release copy and the remediation guide for fixing findings before release.
The action runs the npm CLI package inside your workflow. It does not upload findings to a remote service. Treat text, JSON, and SARIF reports as sensitive artifacts because they may include private file paths or surrounding evidence.
Wrapper changes are documented in CONTRIBUTING.md. Scanner rule changes should go to the main agent-secret-guard repository.
MIT
Report wrapper execution bugs with the bug report form. Scanner rule requests and false-positive reports belong in the main agent-secret-guard repository.
If this project saves you time, you can support future maintenance here: Buy Me a Coffee.