-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Security audit recipe #5319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security audit recipe #5319
Conversation
|
✅ Recipe Validation Passed Your recipe(s) are valid and ready for review! 🔍 Next Steps:
Thanks for contributing to the goose Recipe Cookbook! 🎉 |
|
🔍 Recipe Security Scan Results ✅ Status: APPROVED - All recipes passed security scan 📊 Scan Summary:
📋 Individual Recipe Results: 🔗 View detailed scan results in the workflow artifacts. |
|
Hey @Shreyanshsingh23 thank you for contributing, I'm reviewing your PR now |
Thanks @EbonyLouis, let me know if any changes are required |
SECURITY_RECIPE_SUMMARY.md
Outdated
| @@ -0,0 +1,125 @@ | |||
| # Security Audit & Remediation Pipeline Recipe | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this file please
| title: Security Audit & Remediation Pipeline | ||
| description: An advanced security workflow that orchestrates comprehensive vulnerability scanning, secret detection, code analysis, and automated remediation across multiple project types with intelligent risk assessment and compliance validation | ||
| author: | ||
| contact: goose-security-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be your GH username: Shreyanshsingh23
| title: Code Security Analyzer | ||
| description: Analyzes source code for security vulnerabilities, anti-patterns, and insecure coding practices using static analysis techniques with language-specific security rules | ||
| author: | ||
| contact: goose-security-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same thing for this one, replace this with your GH name
| title: Compliance Checker | ||
| description: Validates project compliance against security standards and frameworks (OWASP, CWE, PCI-DSS, SOX) with detailed gap analysis and remediation roadmaps | ||
| author: | ||
| contact: goose-security-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with your GH username
| title: Secret Detector | ||
| description: Scans codebase for hardcoded secrets, credentials, API keys, and sensitive information using pattern matching and entropy analysis with intelligent false positive reduction | ||
| author: | ||
| contact: goose-security-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with your GH username please
| title: Vulnerability Scanner | ||
| description: Scans project dependencies for known security vulnerabilities (CVEs) across multiple package managers and provides detailed risk assessment with remediation guidance | ||
| author: | ||
| contact: goose-security-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with your GH username please
| prompt: | | ||
| Perform comprehensive security audit on {{ project_path }} with {{ audit_depth }} depth and {{ risk_threshold }} risk threshold. | ||
|
|
||
| CRITICAL: Handle file paths correctly for all operating systems. | ||
| - Detect the operating system (Windows/Linux/Mac) | ||
| - Use appropriate path separators (/ for Unix, \\ for Windows) | ||
| - Be careful to avoid escaping of slash or backslash characters | ||
| - Use os.path.join() or pathlib.Path for cross-platform paths | ||
| - Create security report directories if they don't exist | ||
|
|
||
| Workflow: | ||
| 1. Project Analysis: Detect project type and security requirements | ||
| - Identify programming language and framework | ||
| - Determine dependency management system | ||
| - Check for existing security configurations | ||
| - Store project context in memory | ||
|
|
||
| 2. Parallel Security Scanning: Execute all sub-recipes simultaneously | ||
| - Run vulnerability_scanner for dependency CVEs | ||
| - Run secret_detector for hardcoded credentials | ||
| - Run code_security_analyzer for code vulnerabilities | ||
| - Run compliance_checker for standard validation | ||
| - Store all findings in memory with timestamps | ||
|
|
||
| 3. Risk Assessment: Aggregate and prioritize findings | ||
| - Calculate risk scores based on severity and exploitability | ||
| - Group findings by category and impact | ||
| - Identify false positives and validate critical issues | ||
| - Store risk assessment in memory | ||
|
|
||
| {% if auto_remediate == "true" %} | ||
| 4. Automated Remediation: Create fix branches and PRs | ||
| - Generate fix strategies for known vulnerabilities | ||
| - Create security fix branches | ||
| - Implement automated patches where possible | ||
| - Create pull requests with security fix descriptions | ||
| - Link PRs to security findings in memory | ||
| {% endif %} | ||
|
|
||
| 5. Report Generation: Create comprehensive security report | ||
| - Generate {{ output_format }} security report | ||
| - Include executive summary and detailed findings | ||
| - Provide remediation recommendations | ||
| - Save to {{ project_path }}/security-reports/ | ||
|
|
||
| 6. Security Monitoring Setup: Configure ongoing security | ||
| - Create security policy files | ||
| - Set up dependency scanning in CI/CD | ||
| - Configure secret scanning alerts | ||
| - Document security procedures | ||
|
|
||
| Error Recovery: | ||
| - If a sub-recipe fails, continue with remaining scans | ||
| - Log security scan errors clearly with context | ||
| - Provide partial security assessment if complete audit fails | ||
| - Always prioritize critical security findings | ||
|
|
||
| Security Context Management: | ||
| - Use memory extension to track vulnerabilities across sessions | ||
| - Store project security baseline for future comparisons | ||
| - Maintain security policy compliance status | ||
| - Track remediation progress over time | ||
|
|
||
| For {{ audit_depth }}=="quick", focus on high-impact vulnerabilities only. | ||
| For {{ audit_depth }}=="compliance", emphasize standard adherence. | ||
| Always verify paths work on the current OS before file operations. | ||
| Prioritize findings that could lead to data breaches or system compromise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| prompt: | | |
| Perform comprehensive security audit on {{ project_path }} with {{ audit_depth }} depth and {{ risk_threshold }} risk threshold. | |
| CRITICAL: Handle file paths correctly for all operating systems. | |
| - Detect the operating system (Windows/Linux/Mac) | |
| - Use appropriate path separators (/ for Unix, \\ for Windows) | |
| - Be careful to avoid escaping of slash or backslash characters | |
| - Use os.path.join() or pathlib.Path for cross-platform paths | |
| - Create security report directories if they don't exist | |
| Workflow: | |
| 1. Project Analysis: Detect project type and security requirements | |
| - Identify programming language and framework | |
| - Determine dependency management system | |
| - Check for existing security configurations | |
| - Store project context in memory | |
| 2. Parallel Security Scanning: Execute all sub-recipes simultaneously | |
| - Run vulnerability_scanner for dependency CVEs | |
| - Run secret_detector for hardcoded credentials | |
| - Run code_security_analyzer for code vulnerabilities | |
| - Run compliance_checker for standard validation | |
| - Store all findings in memory with timestamps | |
| 3. Risk Assessment: Aggregate and prioritize findings | |
| - Calculate risk scores based on severity and exploitability | |
| - Group findings by category and impact | |
| - Identify false positives and validate critical issues | |
| - Store risk assessment in memory | |
| {% if auto_remediate == "true" %} | |
| 4. Automated Remediation: Create fix branches and PRs | |
| - Generate fix strategies for known vulnerabilities | |
| - Create security fix branches | |
| - Implement automated patches where possible | |
| - Create pull requests with security fix descriptions | |
| - Link PRs to security findings in memory | |
| {% endif %} | |
| 5. Report Generation: Create comprehensive security report | |
| - Generate {{ output_format }} security report | |
| - Include executive summary and detailed findings | |
| - Provide remediation recommendations | |
| - Save to {{ project_path }}/security-reports/ | |
| 6. Security Monitoring Setup: Configure ongoing security | |
| - Create security policy files | |
| - Set up dependency scanning in CI/CD | |
| - Configure secret scanning alerts | |
| - Document security procedures | |
| Error Recovery: | |
| - If a sub-recipe fails, continue with remaining scans | |
| - Log security scan errors clearly with context | |
| - Provide partial security assessment if complete audit fails | |
| - Always prioritize critical security findings | |
| Security Context Management: | |
| - Use memory extension to track vulnerabilities across sessions | |
| - Store project security baseline for future comparisons | |
| - Maintain security policy compliance status | |
| - Track remediation progress over time | |
| For {{ audit_depth }}=="quick", focus on high-impact vulnerabilities only. | |
| For {{ audit_depth }}=="compliance", emphasize standard adherence. | |
| Always verify paths work on the current OS before file operations. | |
| Prioritize findings that could lead to data breaches or system compromise. | |
| prompt: | | |
| Perform comprehensive security audit on {{ project_path }} with {{ audit_depth }} depth and {{ risk_threshold }} risk threshold. | |
| CRITICAL: Handle file paths correctly for all operating systems. | |
| - Detect the operating system (Windows/Linux/Mac) | |
| - Use appropriate path separators (/ for Unix, \\ for Windows) | |
| - Be careful to avoid escaping of slash or backslash characters | |
| - Use os.path.join() or pathlib.Path for cross-platform paths | |
| - Create security report directories if they don't exist | |
| Workflow: | |
| 1. Project Analysis: Detect project type and security requirements | |
| - Identify programming language and framework | |
| - Determine dependency management system | |
| - Check for existing security configurations | |
| - Store project context in memory | |
| 2. Conditional Security Scanning: Run only the relevant sub-recipes | |
| - Always run: | |
| - vulnerability_scanner (dependency CVEs) | |
| - secret_detector (hardcoded credentials) | |
| - Run code_security_analyzer ONLY if the detected language is supported (Node.js, Python, Go, Rust, Java, .NET) | |
| - Run compliance_checker ONLY when: | |
| - audit_depth == "compliance" | |
| OR | |
| - compliance_standard != "owasp-top10" | |
| - Capture each sub-recipe’s returned output and write it to files under {{ project_path }}/security-reports/: | |
| * vulns.{{ output_format }}, secrets.{{ output_format }}, code.{{ output_format }}, compliance.{{ output_format }} | |
| - Do not rely on sub-recipe memory (it is isolated); aggregate from the written files. | |
| 3. Risk Assessment: Aggregate and prioritize findings | |
| - Calculate risk scores based on severity and exploitability | |
| - Group findings by category and impact | |
| - Identify false positives and validate critical issues | |
| - Store risk assessment in memory | |
| {% if auto_remediate == "true" %} | |
| 4. Automated Remediation: Create fix branches and PRs | |
| - Generate fix strategies for known vulnerabilities | |
| - Create security fix branches | |
| - Implement automated patches where possible | |
| - Create pull requests with security fix descriptions | |
| - Link PRs to security findings in memory | |
| {% endif %} | |
| 5. Report Generation: Create comprehensive security report | |
| - Generate {{ output_format }} security report | |
| - Include executive summary and detailed findings | |
| - Provide remediation recommendations | |
| - Save to {{ project_path }}/security-reports/ | |
| 6. Security Monitoring Setup: Configure ongoing security | |
| - Create security policy files | |
| - Set up dependency scanning in CI/CD | |
| - Configure secret scanning alerts | |
| - Document security procedures | |
| Error Recovery: | |
| - If a sub-recipe fails, continue with remaining scans | |
| - Log security scan errors clearly with context | |
| - Provide partial security assessment if complete audit fails | |
| - Always prioritize critical security findings | |
| Security Context Management: | |
| - Use memory extension to track vulnerabilities across sessions | |
| - Store project security baseline for future comparisons | |
| - Maintain security policy compliance status | |
| - Track remediation progress over time | |
| Depth hints: | |
| - quick: focus high/critical only; shallow scans | |
| - comprehensive: full scans; include medium+ | |
| - deep: full scans plus slower checks | |
| - compliance: emphasize standard mapping/attestation; include roll-up in report | |
| Always verify paths work on the current OS before file operations. | |
| Prioritize findings that could lead to data breaches or system compromise. |
|
@Shreyanshsingh23 This is great, to make sure the security scanner recipe runs the way you intended, I switched this to use conditional logic so it only runs the relevant sub-recipes instead of all of them every time. You can click commit suggestion to make that change easier for you. Also your DCO check is failing, if you follow the steps here you'll be able to solve that issue. Once you make these changes, I’ll be able to approve and merge your PR. 🥳 Let me know if you have any questions! |
e5fe364 to
f6006da
Compare
- Implement comprehensive security audit workflow with 4 specialized sub-recipes - Uses 4+ extensions: developer, memory, filesystem, github - Orchestrates vulnerability scanning, secret detection, code analysis, and compliance checking - Supports multiple project types (Node.js, Python, Go, Rust, Java, .NET) - Includes conditional logic, parameter passing, and parallel execution - Generates security reports in multiple formats (markdown, JSON, SARIF, HTML) - Validates against OWASP, CWE, PCI-DSS, and SOX compliance standards - Provides automated remediation capabilities with PR creation - Includes comprehensive test suite for validation This qualifies as an Advanced Recipe (8-10 points) for the Goose Cookbook. Signed-off-by: Shreyanshsingh23 <[email protected]> Signed-off-by: Shreyansh Singh Gautam <[email protected]>
f6006da to
ccaccf2
Compare
|
✅ Recipe Validation Passed Your recipe(s) are valid and ready for review! 🔍 Next Steps:
Thanks for contributing to the goose Recipe Cookbook! 🎉 |
1 similar comment
|
✅ Recipe Validation Passed Your recipe(s) are valid and ready for review! 🔍 Next Steps:
Thanks for contributing to the goose Recipe Cookbook! 🎉 |
|
Hi @EbonyLouis I’ve applied the suggested conditional logic changes and fixed the DCO check. The PR is now updated and should be ready for review and merge. Thankyou very much for your guidance! 🙌 |
|
🔍 Recipe Security Scan Results ✅ Status: APPROVED - All recipes passed security scan 📊 Scan Summary:
📋 Individual Recipe Results: 🔗 View detailed scan results in the workflow artifacts. |
EbonyLouis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Shreyanshsingh23 thank you so much!
Also we love feedback, if you hop into discord you can start a thread in the goose channel and tag us @devrel.
|
Hey @EbonyLouis, how will the leaderboard get updated ? |
Hello there, The leaderboard updates at the top of the hour. Please make sure to link the issue this closes as well. |
* main: Add tech-article-explainer recipe (#5333) doc: added beta banner for old blog post (#5332) feat: add code refactor recipe (#5320) Security audit recipe (#5319) feat: add generate commit message recipe (#5326) fix: remove dependency on gsap library (#5330) feat: dynamically load ollama models (#5309) fix: skip temperature for goose-gpt-5 model (#5311)
…message # By Better-Boy (3) and others # Via GitHub * 'main' of github.com:block/goose: Create recipe dir on save (#5337) docs: Update Discord link (#5335) [recipe workflow]: Fix `Invalid revision range` error (#5334) Add tech-article-explainer recipe (#5333) doc: added beta banner for old blog post (#5332) feat: add code refactor recipe (#5320) Security audit recipe (#5319) feat: add generate commit message recipe (#5326) fix: remove dependency on gsap library (#5330) feat: dynamically load ollama models (#5309) fix: skip temperature for goose-gpt-5 model (#5311) Replace compaction notifications with system notifications (#5218) # Conflicts: # crates/goose/src/agents/agent.rs
* main: (77 commits) Fix legacy import (#5343) Unify loading goose messages and usechatstream determines chat state (#5306) Docs: goose session export and goose session import (#5267) Create recipe dir on save (#5337) docs: Update Discord link (#5335) [recipe workflow]: Fix `Invalid revision range` error (#5334) Add tech-article-explainer recipe (#5333) doc: added beta banner for old blog post (#5332) feat: add code refactor recipe (#5320) Security audit recipe (#5319) feat: add generate commit message recipe (#5326) fix: remove dependency on gsap library (#5330) feat: dynamically load ollama models (#5309) fix: skip temperature for goose-gpt-5 model (#5311) Replace compaction notifications with system notifications (#5218) Diagnostics (#5323) Fix gemini again (#5308) fix: synchronize local message state after conversation compaction (#5315) docs: replace broken links with working links (#5266) Add Web Accessibility Auditor recipe to cookbook (#5318) ...
Signed-off-by: Shreyanshsingh23 <[email protected]> Signed-off-by: Shreyansh Singh Gautam <[email protected]> Signed-off-by: Blair Allan <[email protected]>
Signed-off-by: Shreyanshsingh23 <[email protected]> Signed-off-by: Shreyansh Singh Gautam <[email protected]> Signed-off-by: Blair Allan <[email protected]>


Security Audit & Remediation Pipeline Recipe
🎯 Overview
This PR implements the Security Audit & Remediation Pipeline recipe for issue #5122 - an advanced security workflow that orchestrates comprehensive vulnerability scanning, secret detection, code analysis, and automated remediation across multiple project types.
✅ Advanced Recipe Qualification
This recipe exceeds all acceptance criteria for Advanced Recipe submissions (8-10 points):
🏗️ Architecture
Main Recipe:
security-audit-pipeline.yamlSub-Recipes
vulnerability-scanner.yaml- Scans dependencies for known CVEssecret-detector.yaml- Detects hardcoded secrets and credentialscode-security-analyzer.yaml- Analyzes source code for security vulnerabilitiescompliance-checker.yaml- Validates compliance against security standards🚀 Advanced Features
📊 Compliance Standards
🎯 Use Cases
📁 Files Added
documentation/src/pages/recipes/data/recipes/
├── security-audit-pipeline.yaml # Main orchestration recipe
└── subrecipes/
├── vulnerability-scanner.yaml # CVE scanning
├── secret-detector.yaml # Credential detection
├── code-security-analyzer.yaml # Static code analysis
└── compliance-checker.yaml # Standards validation
🧪 Testing
🎉 Impact
This recipe provides a production-ready, enterprise-grade security workflow that demonstrates the full power of Goose's advanced recipe capabilities. It will enable developers to:
📋 Checklist
This Security Audit & Remediation Pipeline qualifies as an Advanced Recipe (8-10 points) and is ready for inclusion in the Goose Cookbook!