You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make lint and security scanning blocking in CI: ruff has 133 errors behind || true, bandit findings are unreviewed, pip-audit never runs #114
Problem: CI runs ruff check . || true, so lint can never fail a build. Today ruff check . reports 133 errors (85 auto-fixable): 59 UP045, 18 B008 (function calls in defaults), 9 I001 (unsorted imports), 8 unused unpacked variables, 6 unused noqa, 5 blind except, 4 subprocess.run without check, and more. bandit and pip-audit are in the dev extra but no CI step runs them; bandit -r src/secfoo -c .bandit currently reports one Medium (B608 string-built SQL in storage/repository.pycost_summary, a fixed dict lookup, so a false positive to annotate) and eight Lows (try/except/pass in runner.py and sensor/probe.py, assert in runner.py:414, a B105 false positive on the string "secret-scanning"). pip-audit is clean today, but nothing would tell us when it stops being clean.
Build:
Fix or explicitly configure every ruff finding (ruff check --fix, then the manual ones; put intentional exceptions in [tool.ruff.lint.per-file-ignores] with a reason). Pin the ruff version in pyproject.toml so the result is reproducible, and remove || true.
Review each bandit finding: fix the real ones (the bare except: pass sites should at least log at debug level; the assert in runner.py should be a real check since asserts vanish under -O), add # nosec with a justification to the false positives, then run bandit in CI with -ll (medium and above) blocking.
Add pip-audit to CI on the installed environment, blocking, with an allowlist for accepted advisories (--ignore-vuln entries with a date and reason).
Add ruff format --check only if the codebase is formatted first; if that diff is too large, open a follow-up instead of mixing it in.
CONTRIBUTING.md: document the three commands as the pre-PR checklist.
Where to look:.github/workflows/ci.yml, pyproject.toml, .bandit, src/secfoo/cli.py (34 of the ruff errors), src/secfoo/web/routes/assessments.py, src/secfoo/runner.py, src/secfoo/sensor/probe.py, CONTRIBUTING.md.
Done when:ruff check ., bandit -r src/secfoo -c .bandit -ll and pip-audit all run blocking in CI and pass; the PR lists which bandit findings were fixed and which were annotated, with the reason for each.
Activity
chore(lint): apply ruff's safe autofixes (Optional[X], __all__ order,…
sumittiwari1302 commentedon Nov 27, 2026
Hi @vsn411 , I'd like to take this!
I will work on addressing the ruff lint errors, reviewing the bandit findings, and making ruff, bandit, and pip-audit blocking checks in CI.
ci: make ruff, bandit and pip-audit blocking (secfoo-com#206)