Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

# Dependabot: version updates + security updates.
# - pip ecosystem covers Poetry (pyproject.toml / poetry.lock).
# - github-actions keeps workflow action versions current (supply-chain hardening).
# Updates are grouped to minimize PR noise.
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "pip"
Comment on lines +2 to +7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since this project uses Poetry for dependency management (as defined in pyproject.toml), the package-ecosystem should be set to poetry instead of pip. Dependabot has native support for poetry which correctly updates both pyproject.toml and poetry.lock. Using pip will not update the Poetry lockfile properly and may fail.

# - poetry ecosystem covers Poetry (pyproject.toml / poetry.lock).
# - github-actions keeps workflow action versions current (supply-chain hardening).
# Updates are grouped to minimize PR noise.
version: 2
updates:
  - package-ecosystem: "poetry"

directory: "/"
schedule:
interval: "weekly"
groups:
python-dependencies:
patterns: ["*"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns: ["*"]
37 changes: 37 additions & 0 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Bandit: Python-specific static security analysis (hardcoded secrets, shell
# injection, unsafe deserialization, etc.). Complements CodeQL; results are
# reported to the Security tab via SARIF. Non-blocking (--exit-zero); CodeQL is
# the gate. Replaces the Python coverage previously provided by OSSAR.
name: Bandit

on:
push:
branches: ["development"]
pull_request:
branches: ["development"]
schedule:
- cron: "30 7 * * 2"

permissions:
contents: read

jobs:
bandit:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Bandit
run: pip install "bandit[sarif]"
- name: Run Bandit
run: bandit -r . -x ./tests,./.venv,./venv -f sarif -o bandit.sarif --exit-zero
- name: Upload SARIF to code-scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: bandit.sarif
92 changes: 0 additions & 92 deletions .github/workflows/codeql.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Scans dependency manifest changes on PRs and blocks pull requests that
# introduce known-vulnerable dependencies. Native GitHub action, no external service.
name: Dependency Review

on:
pull_request:
branches: ["development"]

Comment on lines +5 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Security checks skip main 🐞 Bug ⛨ Security

.github/workflows/dependency-review.yml and .github/workflows/bandit.yml only trigger for PRs
targeting development, so pull requests into main won’t run dependency-vulnerability gating or
publish Bandit SARIF results. This creates a security coverage gap because other workflows in this
repo clearly operate on main, indicating it is an active integration/release branch.
Agent Prompt
### Issue description
Dependency Review and Bandit workflows are configured to run only when the PR target branch is `development`, which leaves `main` PRs without these security checks.

### Issue Context
This repo already runs CI and docs builds on `main`, so `main` appears to be an active branch that should receive the same security baseline coverage.

### Fix Focus Areas
- .github/workflows/dependency-review.yml[5-8]
- .github/workflows/bandit.yml[7-13]

### Suggested change
Update workflow triggers to include both branches, e.g.:
```yaml
on:
  pull_request:
    branches: ["main", "development"]
```
(and similarly for `push` in `bandit.yml`).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
fail-on-severity: high
comment-summary-in-pr: on-failure
55 changes: 0 additions & 55 deletions .github/workflows/ossar.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# OpenSSF Scorecard: measures supply-chain security posture (branch protection,
# pinned dependencies, token permissions, etc.) and reports to the Security tab.
name: Scorecard supply-chain security

on:
branch_protection_rule:
schedule:
- cron: "20 7 * * 2"
push:
branches: ["development"]

# Declare default permissions as read only.
permissions: read-all

Check warning on line 13 in .github/workflows/scorecard.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "read-all" with specific permissions (e.g., "contents: read").

See more on https://sonarcloud.io/project/issues?id=ashu-tosh-kumar_todo_notifier&issues=AZ8VNoCbqzuh6f_c69nS&open=AZ8VNoCbqzuh6f_c69nS&pullRequest=155

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge.
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@v2.4.0

Check failure on line 31 in .github/workflows/scorecard.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=ashu-tosh-kumar_todo_notifier&issues=AZ8VNoCbqzuh6f_c69nT&open=AZ8VNoCbqzuh6f_c69nT&pullRequest=155
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Loading