Repository navigation
Make secfoo easy to find, try, and put in CI - #106
Merged
Merged
Conversation
Discoverability - pyproject: keyword-rich PyPI summary, more classifiers, keywords, and project URLs (homepage, docs, source, changelog, issues, CI guide). - README: absolute image/link URLs so it renders on PyPI, a real terminal GIF up top, `uvx secfoo run ...` as the first command, the NodeGoat results table, and a CI section. Convert in 30 seconds - docs/assets/terminal.gif: replay of a real run against OWASP/NodeGoat (scripts/terminal_gif.py renders it from the captured output, no terminal recorder needed). - examples/sample-output/nodegoat/: the unedited SAST and secret-scanning reports, terminal transcript, SARIF and JSONL exports from that run. - `secfoo run` without --agent and without a configured default now uses the first agent CLI found on PATH, or the api agent when a provider key is already in the environment, instead of assuming claude. Tests added. CI - action.yml: composite GitHub Action (install from PyPI, run skills, export SARIF, upload to code scanning, job summary, severity outputs, secfoo's exit code applied after the upload). - .pre-commit-hooks.yaml: `secfoo` and `secfoo-secrets` hooks. - docs/CI.md plus examples/ci/ (GitHub Actions with and without the action, GitLab CI, pre-commit); REFERENCE.md points at them and lists uvx/pipx installs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three things a visitor needs: find the project, see it work in 30 seconds, and drop it into CI.
Get found
pyproject.toml: keyword-rich PyPI summary (“AI security review CLI: SAST, secret scanning, SCA, threat modeling …”), more classifiers, keywords, and[project.urls](homepage, docs, source, changelog, issues, CI guide).Convert in 30 seconds
secfoo runagainst OWASP/NodeGoat, the results table, one finding, SARIF export.scripts/terminal_gif.pyrenders it from the captured output, so no terminal recorder is needed and the text is the real output.uvx secfoo run --skill sast --skill secret-scanning --target …. Behaviour change: without--agentand without a configured default,secfoo runnow uses the first agent CLI found onPATH, or theapiagent whenOPENAI_API_KEY/ANTHROPIC_API_KEY/GEMINI_API_KEYis already set, instead of assumingclaude. It prints which one it picked. Falls back toclaudewhen nothing is found (same error as before). Four tests added.examples/sample-output/nodegoat/: the unedited SAST and secret-scanning reports, transcript, SARIF and JSONL from that run (Claude Code,--depth quick, 4 min 12 s, $3.73, 9 High findings).Get into CI
action.yml: composite GitHub Action. Installs from PyPI, runs the skills, exports SARIF, uploads to code scanning (github/codeql-action/upload-sarif, pinned), writes a job summary, exposesexit-code/critical/high/medium/low/cost-usdoutputs, and applies secfoo's exit code after the upload so findings land in the Security tab even when the gate fails. Optionalinstall-agent-cli: claude|codex|gemini|copilot..pre-commit-hooks.yaml:secfoo(configurable) andsecfoo-secretshooks.docs/CI.md+examples/ci/(GitHub Actions with and without the action, GitLab CI, pre-commit).REFERENCE.mdgainsuvx/pipxinstall lines and pointers.Follow-ups (not in this PR)
ghcr.io/rakfortltd/secfoois referenced by the README/docs but no image is published yet; the private release workflow owns that.artifactLocation.uri; worth splitting into multiple locations.Test plan
pytest tests: 1265 passed;tests/test_sensor/test_python_probe.py::test_sensor_dying_mid_run_drops_events_without_blockingfails identically on untouchedmainon macOS (pre-existing).ruff checkerror count unchanged for the edited files (lint is advisory in CI).uvx secfoo@0.3.1 --helpworks from PyPI.uses: secfoo-com/secfoo@main) to confirm the SARIF upload path end to end.🤖 Generated with Claude Code