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
We can benefit from python-specific security checks at the pre-commit level and in workflows, that supplement the codacy/existing bandit checks in .codacy.yml.
Introduce Python security linting using Bandit in both CI (GitHub Actions) and as a local pre-commit hook. This ensures early detection of insecure patterns during development and consistent enforcement in pull requests.
We would like to:
Provide fast feedback locally via pre-commit
Enforce checks centrally via CI, present results in a thoughtful way
Align with existing security tooling (e.g. CodeQL, dependency scanning)
Be achieved in a maintainable way that can scale if we add more hooks or change workflows
Test to see if it keeps good developer experience, what happens if there are existing issues. Do we need documentation? What kind of issues could this cause?
Double check how much codacy already is checking, and double check the above is reasonable. Research is important as the plan is not fully defined.
Caution
This advanced issue requires extensive independent research and testing.
π Concrete Prerequisites
Proven History: Successfully merged β₯ 5 non-trivial intermediate issues in this repo, including at least 2 relating to github actions.
Expertise: Deep architectural understanding of creating high-quality, well tested workflows
β οΈ AI Usage Policy
Using AI to generate code for Advanced issues is strictly discouraged. AI may be used only to help explain file relationships. We require this workflow to work and follow best principles.
β±οΈ Timeline & Workflow
Typical time: ~2 weeks / ~20 hours.
π΄ Completing an advanced issue in 1β3 days is a red flag and will likely be rejected.
Advised: Post your proposed architectural approach as a comment and wait for feedback before writing any code.
π§ Advanced Contributors β Prerequisites & Expectations
π Problem Description
We can benefit from python-specific security checks at the pre-commit level and in workflows, that supplement the codacy/existing bandit checks in .codacy.yml.
Read about bandit https://bandit.readthedocs.io/en/1.9.4/start.html
Introduce Python security linting using Bandit in both CI (GitHub Actions) and as a local pre-commit hook. This ensures early detection of insecure patterns during development and consistent enforcement in pull requests.
We would like to:
Double check how much codacy already is checking, and double check the above is reasonable. Research is important as the plan is not fully defined.
Caution
This advanced issue requires extensive independent research and testing.
π Concrete Prerequisites
Using AI to generate code for Advanced issues is strictly discouraged. AI may be used only to help explain file relationships. We require this workflow to work and follow best principles.
β±οΈ Timeline & Workflow
π οΈ Implementation Notes
Technical domains involved in this issue:
GitHub Actions workflow setup, triggers (
push,pull_request), permissions (security-events: write), and job configuration.Use of Bandit for Python AST-based security analysis, rule coverage, and handling false positives.
Installing and versioning Bandit in CI and pre-commit environments.
Local enforcement via pre-commit, ensuring fast feedback loops and consistent developer setup.
Optional Bandit configuration (
bandit.yaml), excluding directories (e.g.tests/), and tuning rules to reduce false positives.Ensuring Bandit complements existing tools (e.g. CodeQL, dependency scanning) without redundant coverage.
π‘οΈ Quality & Review Standards
The bar for advanced PRs is "safe, maintainable, architecturally sound, and production-ready."
Notably: Developer architects the solution of how to best apply bandit to the repo
β PR Quality Checklist
Before opening your PR, the contributor must confirm:
π Resources & Support
Sample from github:
https://github.com/actions/starter-workflows/blob/main/code-scanning/bandit.yml
Project References:
π Stuck?