Repository navigation
Conversation
docs/CI.md had copy-paste setups for GitHub Actions, GitLab, Jenkins and pre-commit, but CircleCI users only got the generic "Anything else" snippet. Add examples/ci/circleci-config.yml, modelled on the GitLab job: a cimg/python:3.12 image, pip install secfoo, a gated `secfoo run --agent api` with SARIF and JSONL exports, and store_artifacts for the outputs. CircleCI skips later steps once one fails, so the exit code is saved and applied in a final step after the artifacts are stored. Add a CircleCI section to docs/CI.md covering project environment variables vs. contexts for the API key and the exit codes, and link the example from the README. Fixes secfoo-com#174.
Collaborator
|
Thanks for this! We're closing it only because #204 merged a CircleCI example for #174 a few days ago, so the two now conflict on both files. Your version has two things the merged one doesn't, and we'd welcome a small follow-up PR on top of current
#174 is still open for its last item, a real run on the CircleCI free plan with a link or screenshot showing |
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.
Closes #174
What does this change, and why?
docs/CI.mdhad copy-paste setups for GitHub Actions, GitLab CI, Jenkins and pre-commit, but CircleCI users only got the generic "Anything else" snippet (part of #110).examples/ci/circleci-config.yml, modelled onexamples/ci/gitlab-ci.yml:cimg/python:3.12,pip install secfoo,secfoo run --agent api ... --fail-on high --max-cost 2.00, then SARIF (secfoo.sarif) and JSONL (secfoo-findings.jsonl) exports, uploaded withstore_artifactstogether withsecfoo-result.json.secfoo run's exit code to a file instead of failing straight away. The exports andstore_artifactsstill run, and a final step applies the code, so the artifacts are kept even when the--fail-onor--max-costgate trips. The output folder is passed to--excludeso the scan doesn't read its own results.## CircleCIsection indocs/CI.md, after GitLab CI: where to setOPENAI_API_KEY(project environment variable or context, including thecontext:workflow syntax) and what exit codes 0-3 mean. CircleCI is removed from the "Anything else" heading.Still to do before merge: the issue asks for one run on the CircleCI free plan against a small public repo (
--depth quick --max-cost 0.50), with a link or screenshot showing the uploadedsecfoo.sarif. That run hasn't been done yet. I'll add the link or screenshot here, or a maintainer can.Testing
Ran
pytestin a clean Linux container: the 4 remaining failure(s) also occur on the base branch without this change; no new failures are introduced.pytest testspassesruff check .passesThis PR was prepared with AI assistance (Claude) and reviewed by me before submitting.