Skip to content

Add/security framework - #141

Open
vwinland wants to merge 4 commits into
mainfrom
add/security-framework
Open

vwinland wants to merge 4 commits into
mainfrom
add/security-framework

Conversation

@vwinland

@vwinland vwinland commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Establishes an automated security, dependency governance, and vulnerability scanning framework across all tutorial subdirectories, along with public disclosure policy and contributor guidelines.

This automation prevents vulnerable dependencies from entering main and automates the triage/update process for emerging CVEs to prevent future repository archiving.


Key Changes

1. Automated Dependency Scanning & Management

  • .github/dependabot.yml: Configured weekly dependency scanning covering all package manifests (pip, npm, and github-actions) across all tutorial projects.
  • .github/workflows/dependabot-auto-approve.yml: Auto-approves patch and minor Dependabot PRs; adds a warning comment on major updates requesting manual validation.

2. CI/CD Security Gateways & Scanning

  • .github/workflows/dependency-review.yml: Blocks PRs that introduce moderate or higher severity vulnerabilities.
  • .github/workflows/codeql-analysis.yml: Automated static analysis scanning for Python and JavaScript/TypeScript on push, PR, and weekly schedule.
  • .github/workflows/python-security.yml: Runs pip-audit across all requirements*.txt and pyproject.toml files, failing the build on discovered vulnerabilities. Bandit SARIF upload enabled.
  • .github/workflows/secret-scan.yml: Enforces zero unbaselined secrets using detect-secrets-hook.

3. Documentation & Policy

  • SECURITY.md: Outlines private vulnerability reporting procedures, SLAs, and security triggers.
  • CONTRIBUTING.md: Added a concise Dependency & Security Standards section clarifying CI gates and dependency pinning expectations for contributors.

Verification

  • Workflows validated for syntax, triggers, and permissions.
  • Tested detect-secrets-hook against .secrets.baseline.
  • Verified pip-audit failure handling on manifests.
  • Addressed all automated reviewer recommendations.

- .github/dependabot.yml: weekly dependency scanning across all 11
  package locations (pip, npm, github-actions)
- .github/workflows/dependency-review.yml: blocks PRs introducing
  medium+ severity vulnerabilities; posts summary comment on PR
- .github/workflows/dependabot-auto-approve.yml: auto-approves
  Dependabot patch/minor PRs; labels major updates for manual review
- .github/workflows/codeql-analysis.yml: static analysis for Python
  and JavaScript on push, PR, and weekly schedule
- .github/workflows/python-security.yml: pip-audit across all
  requirements files + Bandit SARIF upload on push and PR
- .github/workflows/secret-scan.yml: detect-secrets against baseline
  on every push and PR
- SECURITY.md: vulnerability reporting process and security policy

This framework would have prevented the archival incident in issue #136
by catching vulnerable dependency updates before they merged and opening
automated fix PRs within days of a CVE being published.
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/secret-scan.yml

PackageVersionLicenseIssue Type
actions/checkout4.*.*NullUnknown License
actions/setup-python5.*.*NullUnknown License
Allowed Licenses: Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, ISC, Python-2.0, PSF-2.0, CC0-1.0, Unlicense, 0BSD

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 4.*.* 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 57 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
actions/actions/setup-python 5.*.* 🟢 6.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1017 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9

Scanned Files

  • .github/workflows/secret-scan.yml

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical security scans can pass despite vulnerabilities or newly committed secrets.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 2 Medium severity

Open (4)
What changed in this PR

Adds repository security scanning, dependency governance, automated update handling, and security policy documentation.

Changes:

  • Adds Dependabot monitoring and update workflows.
  • Adds dependency review, CodeQL, pip-audit, Bandit, and secret scanning.
  • Documents vulnerability reporting and contributor security standards.
File Review summary
SECURITY.md Nit: Document the actual workflow branch filters and schedules.
CONTRIBUTING.md No final comments.
.github/​workflows/​secret-scan.yml Critical: The scan does not enforce newly detected secrets. Moderate: Notebooks are excluded from scanning.
.github/​workflows/​python-security.yml Critical: Audit failures are suppressed. Moderate: The WareHouse requirements are excluded.
.github/​workflows/​dependency-review.yml No final comments.
.github/​workflows/​dependabot-auto-approve.yml Moderate: The workflow lacks permission to approve pull requests. Moderate: Required labels do not exist.
.github/​workflows/​codeql-analysis.yml No final comments.
.github/​dependabot.yml Moderate: Several dependency manifests are not covered.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/python-security.yml Outdated
Comment on lines +33 to +44
- name: Audit requirements files
# continue-on-error so all files are scanned even if some have vulnerabilities
continue-on-error: true
run: |
find . -name "requirements*.txt" \
-not -path "*/node_modules/*" \
-not -path "*/.venv/*" \
-not -path "*/WareHouse/*" \
| while read f; do
echo "=== $f ==="
pip-audit -r "$f" --desc || true
done
Comment thread .github/workflows/secret-scan.yml Outdated
Comment on lines +30 to +35
detect-secrets scan \
--baseline .secrets.baseline \
--exclude-files '.*\.lock$' \
--exclude-files '.*package-lock\.json$' \
--exclude-files '.*\.ipynb$' \
--exclude-files '.*/node_modules/.*'
Comment thread .github/dependabot.yml
Comment on lines +24 to +26
# requirements.txt files
- package-ecosystem: "pip"
directory: "/tutorials/17-data-streaming/confluent-modernization"
name: Dependabot Auto-Approve

on:
pull_request:

This branch has not been deployed

No deployments
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.

4 participants