Skip to content

Add dependency security audit workflow#978

Open
CelebrityPunks wants to merge 1 commit intoScottcjn:mainfrom
CelebrityPunks:bounty/dependency-audit-action
Open

Add dependency security audit workflow#978
CelebrityPunks wants to merge 1 commit intoScottcjn:mainfrom
CelebrityPunks:bounty/dependency-audit-action

Conversation

@CelebrityPunks
Copy link
Contributor

Summary

  • Adds a new GitHub Action workflow (dependency-audit.yml) that scans Python dependencies for known vulnerabilities
  • Uses pip-audit and safety to check installed packages against vulnerability databases
  • Includes an unpinned dependency check to flag loose version constraints in requirements.txt
  • Runs on dependency file changes, weekly on schedule (Monday 8 AM UTC), and on manual dispatch
  • Uploads audit reports as artifacts for review

Bounty

Closes Scottcjn/rustchain-bounties#1605

Test plan

  • Trigger workflow manually via workflow_dispatch to verify it runs
  • Verify pip-audit and safety scan results appear in job summary
  • Confirm artifact upload contains audit report files
  • Check that the workflow triggers on requirements.txt changes

Introduces a GitHub Action that scans Python dependencies for known
vulnerabilities using pip-audit and safety. Runs on dependency file
changes, weekly on schedule, and on manual dispatch. Reports results
to the job summary and uploads artifacts for review.

Closes Scottcjn/rustchain-bounties#1605
@github-actions
Copy link

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

Copy link
Owner

@Scottcjn Scottcjn left a comment

Choose a reason for hiding this comment

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

Good idea for a CI workflow, but a few issues to fix:

  1. safety check requires an API key now for the commercial Safety DB. Without SAFETY_API_KEY, it will always fail (masked by continue-on-error: true). Either add a secret or remove the safety step.
  2. issues: write permission is granted but never used (no step creates issues). Remove for least-privilege.
  3. Confirm that requirements.txt and requirements-node.txt exist in the repo — if not, the job is a no-op.

Fix these and I will merge.

Copy link

@achievefibromyalgia-lgtm achievefibromyalgia-lgtm left a comment

Choose a reason for hiding this comment

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

Code Review: #978 Dependency Security Audit

Overall: Essential security improvement!

Strengths:

  • Uses pip-audit and safety for vulnerability scanning
  • Good coverage (Python dependencies)
  • Scheduled runs (weekly) + on-push triggers

Technical Quality:

  • Clean workflow YAML
  • Good security practices

Verdict: ✅ Approved - Important security addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci size/XS PR: 1-10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EASY BOUNTY: 1 RTC] Add a CONTRIBUTING.md to any repo missing one

4 participants