Repository navigation
feat(automations): add the GitHub CVE Remediation Factory template and skill #948
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| { | ||
| "id": "cve-remediation-factory", | ||
| "name": "GitHub CVE Remediation Factory", | ||
| "category": "Security", | ||
| "description": "Deploy scanners and agents to remediate vulnerabilities as soon as they are detected.", | ||
| "diagram": "flowchart TD\n A([\"Daily scan\"]) --> B[\"Trivy + Grype results in a new repo\"]\n B --> C[\"Agent ranks fixable CVEs and submits PRs\"]\n C --> D[\"(Optional) Slack status report\"]", | ||
| "requires": { | ||
| "integrations": { | ||
| "github": { | ||
| "message": "Used to read your repositories, create the private findings repository, and open upgrade pull requests." | ||
| } | ||
| }, | ||
| "features": [ | ||
| "presetPrompt", | ||
| "conversationDispatch" | ||
| ] | ||
| }, | ||
| "icon": "shield-check", | ||
| "popularityRank": 101, | ||
| "estimatedSetupMinutes": 20, | ||
| "triggers": [ | ||
| "cron" | ||
| ], | ||
| "exampleImplementation": "Trigger: cron, daily scan then weekday remediation\nRequired secrets: none (uses your GitHub connection); optionally CVE_FACTORY_GIT_TOKEN for a bot account and SLACK_BOT_TOKEN\n\n1. Build an inventory of what you ship: container images from Helm charts, manifests and compose files, and source repositories with lockfiles.\n2. Seed a private findings repository with factory.yaml and the scanner.\n3. Scan every image and repository with Trivy and Grype and store the results on a branch.\n4. Rank fixable CRITICAL and HIGH findings and open bundled upgrade pull requests.\n5. Track each fix in a work log until the scan stops reporting it, and write a short status report (and Slack, when configured).", | ||
| "setup": { | ||
| "version": "1.0", | ||
| "mode": "assisted", | ||
| "form": { | ||
| "note": "The bot will act as your identity through your GitHub connection. To use a separate identity (recommended), create a bot account and its token, and save the token as a secret named CVE_FACTORY_GIT_TOKEN.", | ||
| "args": { | ||
| "repositories": { | ||
| "type": "repo-picker", | ||
| "label": "Repositories to protect", | ||
| "help": "Optional. If you add none, the agent covers every active repository your GitHub connection can read.", | ||
| "provider": "github", | ||
| "multiple": true, | ||
| "required": false | ||
| }, | ||
| "shipType": { | ||
| "type": "select", | ||
| "label": "What do you ship?", | ||
| "help": "The types of deployable artifacts the agent will look for.", | ||
| "default": "Let the agent figure it out", | ||
| "required": false, | ||
| "options": [ | ||
| { | ||
| "value": "Let the agent figure it out", | ||
| "label": "Let the agent figure it out" | ||
| }, | ||
| { | ||
| "value": "Container images (Docker, Kubernetes, Helm, Compose)", | ||
| "label": "Container images (Docker, Kubernetes, Helm, Compose)" | ||
| }, | ||
| { | ||
| "value": "Libraries and packages (npm, PyPI, Maven/Gradle JARs, Go modules)", | ||
| "label": "Libraries and packages (npm, PyPI, Maven/Gradle JARs, Go modules)" | ||
| }, | ||
| { | ||
| "value": "Code deployed from the repo (serverless, VMs, PaaS)", | ||
| "label": "Code deployed from the repo (serverless, VMs, PaaS)" | ||
| } | ||
| ] | ||
| }, | ||
| "notes": { | ||
| "type": "textarea", | ||
| "label": "Which repo best shows what you deploy? Anything else to know?", | ||
| "help": "The repo that represents your most prominent security concern, also add anything else the agent might need to know", | ||
| "placeholder": "Start with owner/repo, it showcases our primary deployment pipeline", | ||
| "required": false, | ||
| "constraints": { | ||
| "maxLength": 2000 | ||
| } | ||
| }, | ||
| "slackChannel": { | ||
| "type": "text", | ||
| "label": "Slack channel for the daily status", | ||
| "help": "Recommended. Leave blank to keep the daily status only in the findings repository.", | ||
| "placeholder": "#cve-automation", | ||
| "required": false, | ||
| "constraints": { | ||
| "maxLength": 100 | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "message": "Time to set up a GitHub CVE Remediation Factory. Here's what happens next:\n\n1. The agent explores your repositories to work out what to scan, based on your answers below.\n2. It presents a plan for you to approve.\n3. Once you approve, it creates the scanning repository, the first scan starts, and you create the automation on the right.\n\nYour answers:\n\n- Repositories to protect (blank = all repos in the org): {{form.repositories}}\n- Ships: {{form.shipType}}\n- Start with (blank = the agent decides): {{form.notes}}\n- Slack channel (blank = no Slack): {{form.slackChannel}}" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -309,7 +309,8 @@ | |
| "bot", | ||
| "circle-alert", | ||
| "activity", | ||
| "timer" | ||
| "timer", | ||
| "shield-check" | ||
| ] | ||
| }, | ||
| "subPageNavItem": { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "name": "cve-remediation-factory", | ||
| "version": "1.0.0", | ||
| "description": "Set up a private CVE remediation factory on GitHub: inventory and scan what you ship (container images and source repositories) with Trivy and Grype, then open small upgrade pull requests for fixable CRITICAL and HIGH vulnerabilities.", | ||
| "author": { | ||
| "name": "OpenHands", | ||
| "email": "contact@all-hands.dev" | ||
| }, | ||
| "homepage": "https://github.com/OpenHands/extensions", | ||
| "repository": "https://github.com/OpenHands/extensions", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "security", | ||
| "cve", | ||
| "trivy", | ||
| "vulnerability", | ||
| "automation" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # CVE Remediation Factory | ||
|
|
||
| Sets up a scan-and-remediate pipeline for container image vulnerabilities. Run `/cve-remediation-factory`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
AGENTS.mdsets the policy for this flag: the default-enabled set should stay small and provider-agnostic, and anything language-, vendor- or workflow-specific "should start off and be opted into from the catalog UI". This skill is GitHub-only (SKILL.md: "GitHub only") and is a specific workflow (CVE remediation), so it meets both exclusions, yetdefaultEnabled: trueships it inDEFAULT_ENABLED_SKILL_NAMESfor every new workspace. Please drop the flag so users opt in from the catalog UI, or note the maintainer-approved exception if default-on is intentional for a featured security template.