Skip to content

docs: add CircleCI CI example and documentation - #204

Merged
vsn411 merged 2 commits into
secfoo-com:mainfrom
deba310984:fix-174
Nov 27, 2026
Merged

vsn411 merged 2 commits into
secfoo-com:mainfrom
deba310984:fix-174

Conversation

@deba310984

@deba310984 deba310984 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Adds examples/ci/circleci-config.yml (cimg/python:3.12, pip install secfoo, secfoo run --agent api ... --fail-on high --max-cost 2.00, SARIF and JSONL export, store_artifacts, which runs even when a gate fails) and a ## CircleCI section in docs/CI.md after GitLab CI. The section covers setting OPENAI_API_KEY as a project environment variable or in a context, and what exit codes 0-3 mean. CircleCI is removed from the generic 'Anything else' heading since it now has its own section.

Testing: docs and example only, no code changes.

Part of #174 (the issue stays open until a successful CircleCI run is linked).

@vsn411

vsn411 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this, and welcome! The example follows gitlab-ci.yml closely, and the docs section covers what #174 asks for:

  • the key in a project variable or a context;
  • the exit codes;
  • why the exports run before the step fails.

Three things before we merge:

  1. A real run. The PR body still has the template's <TODO … add the link to a successful CircleCI run>. CI example: CircleCI (examples/ci + docs/CI.md) #174 asks for a link to a successful pipeline run, or a screenshot of the job's Artifacts tab showing secfoo.sarif. The CircleCI free plan works, and --depth quick --max-cost 0.50 on a small public repo keeps it to a few cents. The run also confirms that CircleCI accepts the config as written.
  2. when: always on store_artifacts. CircleCI documents only path and destination for store_artifacts, and the step already runs after a failed step: docs. Please drop when: always from the three steps. Also change the docs sentence "A failed step skips the steps after it, so each store_artifacts carries when: always" to say that store_artifacts runs even when the review step fails. If your test run shows otherwise, tell us and keep it.
  3. One artifact step (optional). Writing the three files into a secfoo-reports/ directory, and storing that with one store_artifacts, keeps the example shorter. It's also what the Azure example does.

CI hasn't run yet because this is your first PR here. A maintainer will approve the workflow run.

store_artifacts documents only path and destination, and it already
runs after a failed step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vsn411
vsn411 merged commit d90d3f0 into secfoo-com:main Nov 27, 2026
9 checks passed
@vsn411

vsn411 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Merged, thank you, and congratulations on your first contribution to secfoo! 🎉

To get it in today, I pushed one small change to your branch (a84b8ef). It drops when: always from the three store_artifacts steps, because CircleCI documents only path and destination there and the step already runs after a failure. The matching docs sentence now says that.

#174 stays open for its last step, a real run. If you get the chance to run the example once on the CircleCI free plan, please post the run link, or a screenshot of the Artifacts tab showing secfoo.sarif, on #174 and we'll close it. --depth quick --max-cost 0.50 on a small public repo keeps it to a few cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants