Skip to content

feat(automations): add secfoo hook entrypoint, recipes, host adapters, and automations CLI (#242) - #291

Open
Sanjai-Gopal wants to merge 3 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-hook-242-v2
Open

Sanjai-Gopal wants to merge 3 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-hook-242-v2

Conversation

@Sanjai-Gopal

Copy link
Copy Markdown
Contributor

Fixes #242

Re-submitted with all review feedback from #281 addressed and rebased onto main:

  1. Non-blocking subprocess timeout: Launches one detached secfoo run --json subprocess first and waits up to budget_seconds via proc.wait(timeout=...), returning backgrounded: true immediately without ThreadPoolExecutor / atexit thread joins.
  2. Non-success status handling: Checks outcome.status before severity counts and returns warn (secfoo scan did not complete: <status>) for failed, timeout, binary_not_found, or not_configured runs instead of reporting clean.
  3. Configurable agent: Resolves --agent -> recipe.agent -> ~/.secfoo/config.toml default agent (load_config().defaults.agent) instead of hardcoding api.

Testing

  • pytest tests/test_automations/ tests/test_docs_consistency.py -v (28 passed)
  • ruff check . (All checks passed)
  • bandit -r src/secfoo -c .bandit -ll -q (exit 0)

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.

secfoo hook + secfoo automations: one tested entrypoint for every AI tool, recipes enabled on the fly

1 participant