Skip to content

Security: Harden GitHub workflows and document accepted risks#13

Merged
CybotTM merged 1 commit into
mainfrom
security/fix-codeql-alerts
Jan 5, 2026
Merged

Security: Harden GitHub workflows and document accepted risks#13
CybotTM merged 1 commit into
mainfrom
security/fix-codeql-alerts

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Dec 19, 2025

Summary

  • ci.yml: Add explicit permissions: contents: read, pin all action SHAs
  • release.yml: Pin all action SHAs to immutable commits
  • CodeQL config: Document accepted low-risk alerts

Security Hardening

All GitHub Actions pinned to immutable commit SHAs:

  • actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2)
  • actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 (v5.6.0)
  • codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 (v5.4.3)
  • actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 (v4.6.2)
  • actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 (v4.3.0)
  • softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 (v2.2.2)
  • pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc (v1.12.4)

Accepted Risks (Documented)

  1. py/incomplete-url-substring-sanitization in catalog.py

    • URL checks used for VERSION DETECTION only (npm, pypi, crates)
    • Package names come from internal catalog, not user input
    • No installation decisions made based on these checks
    • Security impact: LOW
  2. py/overly-permissive-file in tests/test_bulk.py

    • Test code operating on temporary directories
    • Using 0o755 on temp dir is appropriate for test cleanup

Test Plan

  • CI workflow runs successfully with pinned actions
  • Release workflow uses pinned SHAs
  • CodeQL scanning excludes documented false positives

Changes:
- ci.yml: Add explicit permissions, pin all action SHAs
- release.yml: Pin all action SHAs to immutable commits
- Add CodeQL config documenting accepted low-risk URL substring alerts

Security hardening:
- actions/checkout@11bd719 (v4.2.2)
- actions/setup-python@a26af69 (v5.6.0)
- codecov/codecov-action@18283e0 (v5.4.3)
- actions/upload-artifact@ea165f8 (v4.6.2)
- actions/download-artifact@d3f86a1 (v4.3.0)
- softprops/action-gh-release@da05d55 (v2.2.2)
- pypa/gh-action-pypi-publish@76f52bc (v1.12.4)

Accepted risks documented in codeql-config.yml:
- py/incomplete-url-substring-sanitization: Used for version detection only
- py/overly-permissive-file: Test code operating on temp directories
@CybotTM CybotTM force-pushed the security/fix-codeql-alerts branch from 0c0e9e8 to e67954d Compare January 5, 2026 16:02
@CybotTM CybotTM merged commit d41f1c4 into main Jan 5, 2026
8 checks passed
@CybotTM CybotTM deleted the security/fix-codeql-alerts branch January 5, 2026 16:02
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