Skip to content

Add OpenGrep SAST workflow and security waivers file#17

Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1754653447-add-security-files
Closed

Add OpenGrep SAST workflow and security waivers file#17
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1754653447-add-security-files

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Add OpenGrep SAST Security Scanning to All 62 Zampfi Repositories

Summary

This is a comprehensive security enhancement initiative that adds standardized OpenGrep SAST (Static Application Security Testing) workflows across all 62 active repositories in the Zampfi organization. This bulk operation implements two critical security files in each repository:

  1. .github/workflows/opengrep-sast.yaml - A 273-line GitHub Actions workflow that runs OpenGrep security scanning on all PRs and pushes to main
  2. .security-waivers.json - An empty security waivers file ({"waivers": []}) for managing security exceptions

Current Status: 41/62 PRs created and in progress. The security workflow is designed to block PRs with critical/high security issues until they are resolved or properly waived.

Key Features:

  • Comprehensive security rule coverage (TypeScript, Python, Java, Go, etc.)
  • Automatic security report generation in markdown format
  • Security waiver system for managing false positives
  • Integration with GitHub Actions for automated scanning

Review & Testing Checklist for Human

⚠️ HIGH RISK: This affects all 62 repositories and changes how security is handled organization-wide.

  • Verify security workflow isn't overly restrictive - Test that the OpenGrep SAST workflow doesn't block legitimate development. Check if the security rules are appropriate for your codebase patterns.
  • Investigate unexpected CI failures - Several PRs show 2+ failed checks (beyond expected security-scan). Review connectivity-platform, data_platform, herm, and contract_extraction for non-security-related failures.
  • Complete the remaining 21 PRs - Ensure all 62 repositories receive the security files. The bulk operation was interrupted at 41/62.
  • Test the waiver system end-to-end - Create a test security issue, add it to .security-waivers.json, and verify it gets properly ignored by the workflow.
  • Validate security scan results are actionable - Review a sample of security-scan failures to ensure they represent real issues and not overwhelming false positives.

Recommended Test Plan:

  1. Pick 2-3 representative repositories with different tech stacks
  2. Create test PRs that should trigger security issues
  3. Verify the security workflow blocks appropriately
  4. Test adding waivers and confirm they work
  5. Check that normal development PRs aren't blocked

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    Source["herm-frontend/<br/>opengrep-sast.yaml"]:::major-edit --> BulkScript["bulk_pr_automation.py<br/>Processes 62 repos"]:::major-edit
    
    BulkScript --> Branches["61 successful branches<br/>1 failed (pantheon)"]:::context
    
    Branches --> PRCreation["41 PRs Created<br/>21 Remaining"]:::minor-edit
    
    PRCreation --> SecurityWorkflow["OpenGrep SAST Workflow<br/>Scans on PR/push"]:::major-edit
    PRCreation --> WaiversFile[".security-waivers.json<br/>Empty waivers array"]:::major-edit
    
    SecurityWorkflow --> ExpectedFailures["Expected: security-scan failures<br/>Shows workflow working"]:::context
    SecurityWorkflow --> UnexpectedFailures["Unexpected: Additional CI failures<br/>Needs investigation"]:::context
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit  
        L3[Context/No Edit]:::context
    end

    classDef major-edit fill:#90EE90
    classDef minor-edit fill:#87CEEB
    classDef context fill:#FFFFFF
Loading

Notes

  • Session Details: Requested by shashvat@zamp.ai | Session: https://app.devin.ai/sessions/6b8a3486391f45e0b66ec32758e5f7da
  • Expected Behavior: The "security-scan" CI failures are expected and indicate the workflow is correctly identifying security issues
  • Trailing Whitespace Fix: Applied to source file but may need to be propagated to existing branches
  • Pantheon Repository: Failed during bulk operation due to pre-commit hook issues with trailing whitespace
  • Success Indicator: payments-sdk PR shows all checks passed, proving the workflow functions correctly when no security issues are found

⚠️ Critical: This security workflow will block PRs with critical/high severity issues. Ensure your team understands how to use the waiver system before merging these changes.

- Add OpenGrep SAST security scanning workflow
- Add empty security waivers file for managing security exceptions
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 8, 2025

🔴 Security Scan: Critical/High Issues Found

1 critical/high severity security issue(s) must be resolved before merging.

🚨 Blocking Issues


📥 Full report available in workflow artifacts: security-report
🛡️ To waive issues, follow the instructions in the security report

@devin-ai-integration
Copy link
Copy Markdown
Author

Closing due to inactivity for more than 7 days. Configure here.

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.

0 participants