Skip to content

Make lint and security scanning blocking in CI: ruff has 133 errors behind || true, bandit findings are unreviewed, pip-audit never runs #114

Done

Description

@vsn411

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.py cost_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:

  1. 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.
  2. 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.
  3. Add pip-audit to CI on the installed environment, blocking, with an allowlist for accepted advisories (--ignore-vuln entries with a date and reason).
  4. 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.
  5. 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

  1. added
    enhancement
    help wanted
    hackathon
    difficulty: medium
    on Nov 15, 2026
  2. sumittiwari1302 commented on Nov 27, 2026

    @sumittiwari1302

    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.

  3. added a commit that references this issue on Nov 29, 2026
    dd1b07c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: mediumenhancementhackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions