Skip to content

ci: add pip-audit scan and remediate 25 vulnerable pinned deps - #5

Merged
Franky100-pig merged 2 commits into
Exabyte-Technologies:mainfrom
Franky100-pig:ci/dependency-audit
Oct 25, 2026
Merged

Franky100-pig merged 2 commits into
Exabyte-Technologies:mainfrom
Franky100-pig:ci/dependency-audit

Conversation

@Franky100-pig

@Franky100-pig Franky100-pig commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Adds .github/workflows/security-scan.yml, a pip-audit dependency
    vulnerability scan (official pypa/gh-action-pip-audit@v1.1.0) against the
    pinned requirements.txt.
  • The first run found 25 known vulnerabilities across 5 packages, including
    serious Authlib issues (JWK header injection → forgeable JWTs / auth bypass,
    CSRF → account takeover, padding oracle, open redirect, OIDC fail-open) and a
    Flask cache-leak. This PR remediates them by bumping the pins to fixed
    versions.

Why

deploy.yml only ran pytest + pip check — no CVE scanning. As a Flask app
handling auth, sessions, and API keys, Resona must fail CI on known-vulnerable
pins. The scan is now the gate; the version bump is the actual fix.

Dependency fixes

Package Before After Notes
Flask 3.1.1 3.1.3 Vary: Cookie cache-leak (PYSEC-2026-2151)
Authlib 1.6.1 1.6.12 JWK injection, CSRF, padding oracle, open redirect, OIDC fail-open (multiple PYSEC)
python-dotenv 1.1.1 1.2.4 symlink .env overwrite (PYSEC-2026-2270)
requests 2.32.4 2.34.2 extract_zipped_paths predictable tmp (PYSEC-2026-2275)
pytest 8.4.1 9.1.1 /tmp/pytest-of-{user} predictable dir (PYSEC-2026-1845, dev-only)

Authlib is pinned to the newest 1.6.x (the security-patch line) to stay
API-compatible with Resona's OIDC integration instead of jumping to 1.9.x.

Verification

  • Full suite green on the bumped versions: 127 passed.
  • Scan triggers on push/PR/weekly/manual and is independent of deploy.yml
    (cannot block or break deploys). summary: true gives an inline report.

Note

The earlier upload-sarif action input was removed — it is not a valid input
for pypa/gh-action-pip-audit@v1.1.0 (it only emitted a warning). SARIF upload
to the Security tab can be added later as a separate step if desired.

Add .github/workflows/security-scan.yml, an independent supply-chain
scan that runs pip-audit against the pinned requirements.txt on push,
pull_request, a weekly schedule, and manual dispatch. SARIF results are
uploaded to the code-scanning dashboard for triage in the Security tab.
Kept separate from deploy.yml so the security gate cannot block or
break production deploys.
pip-audit flagged 25 known vulnerabilities in 5 packages (Flask, Authlib,
python-dotenv, requests, pytest), including Authlib auth-bypass / account-takeover
class issues (JWK header injection, CSRF, padding oracle, open redirect, OIDC
fail-open). Bump to fixed versions; pin Authlib to newest 1.6.x to stay
API-compatible with the OIDC integration instead of jumping to 1.9.x.

Also drop the invalid 'upload-sarif' input from security-scan.yml (not a valid
input for pypa/gh-action-pip-audit@v1.1.0; it only emitted a warning).

Full test suite green on the bumped versions: 127 passed.
@Franky100-pig Franky100-pig changed the title ci: add pip-audit dependency vulnerability scan ci: add pip-audit scan and remediate 25 vulnerable pinned deps Oct 24, 2026
@Franky100-pig
Franky100-pig merged commit 708ce8a into Exabyte-Technologies:main Oct 25, 2026
1 check passed
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.

1 participant