cve-fix
Skill2 starsChanged 19 days agoApache-2.0View on GitHub
Automatically fix CVE vulnerabilities in Python dependencies for downstream projects. Queries Jira for unresolved CVEs, filters already-fixed issues, updates Pipfile and Pipfile.lock using container-based pipenv lock, creates MRs, and updates Jira. Use when the user mentions CVEs, vulnerabilities, security fixes, CVE remediation, dependency security updates, or asks to fix CVEs.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- flightctl/ai-workflowstheir own version, first seen Oct 22, 2026
- luisgf/infrabrokertheir own version, first seen Oct 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- luisgf/infrabroker★ 13same name
- flightctl/ai-workflows★ 10same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- add-projectSkill
- ansible-configure-vmSkill
- api-smoke-testSkill
- appinterface-checkSkill
- attach-session-to-jiraSkill
- aws-rds-debugSkill
- beerSkill
- bootstrap-all-knowledgeSkill
- bootstrap-knowledgeSkill
- build-persona-styleSkill
- cancel-pipelineSkill
- cert-checkSkill
- check-ci-healthSkill
- check-integration-testsSkill
- check-mr-feedbackSkill
- check-my-prsSkill
- check-secretsSkill
- ci-retrySkill
- cleanup-branchesSkill
- cleanup-stale-executionsSkill
- clone-jira-issueSkill
- close-issueSkill
- close-mrSkill
- cloud-inventorySkill
- coffeeSkill
- compare-optionsSkill
- create-jira-issueSkill
- create-mrSkill
- create-slide-deckSkill
- data-migration-verifySkill
- debug-local-dbSkill
- debug-prodSkill
- deploy-to-ephemeralSkill
- dev-workflow-orchestratorSkill
- discovered-work-summarySkill
- edit-slide-deckSkill
- email-digestSkill
- environment-overviewSkill
- explain-codeSkill
- export-presentationSkill
- extend-ephemeralSkill
- find-similar-codeSkill
- gather-contextSkill
- gdrive-researchSkill
- gke-cluster-opsSkill
- hello-worldSkill
- hotfixSkill
- inscope-researchSkill
- investigate-alertSkill
- investigate-service-issuesSkill
- investigate-slack-alertSkill
- jira-hygiene-allSkill
- jira-hygieneSkill
- knowledge-refreshSkill
- konflux-statusSkill
- learn-architectureSkill
- learn-patternSkill
- list-presentationsSkill
- local-build-testSkill
- local-dev-environmentSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 8 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Both files must update: Always update Pipfile AND Pipfile.lock together.
- Very specific: line 16
Branch isolation: Always create branches from origin/main, never from another feature branch.
- Very specific: line 17
Error handling: Use isinstance() checks before .get() on variables that might be error strings instead of dicts (e.g., when pipenv lock …
- Distinctive: line 19
Rebase conflicts: When multiple CVE fixes are in flight, document which packages were modified to help resolve conflicts.
- Distinctive: line 67
Must have both CVE ID and affected package
- Distinctive: line 74
If resuming a CVE that already has a branch:
- Very specific: line 77
Check it out (try local first, then origin/<branch>).
- Very specific: line 78
Check commits ahead of origin/main to detect what's already done.
- Very specific: line 79
Check if Pipfile/Pipfile.lock are already committed.
- Distinctive: line 80
Check if branch is already pushed to remote.
- Distinctive: line 87
Set acceptance criteria: if not already present:
- Very specific: line 132
If package exists: update to >= <new_version> with CVE comment
- Very specific: line 133
If package missing: add after [packages] header
- Distinctive: line 134
Update companion packages too if needed
- Distinctive: line 137
Update version and hashes for main package
- Distinctive: line 172
Restore developer persona: after scan.
- Very specific: line 176
When dry_run is true, show what would be done without making any changes.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CVE Fix
Automated CVE remediation for Python dependencies. Queries Jira for CVEs, updates Pipfile and Pipfile.lock, creates MRs, and updates Jira.
Critical Lessons Learned
These are hard-won from production use. Follow them strictly:
- Dependency cascade: Upgrading one package often breaks others (e.g., aiohttp 3.13+ broke gql, urllib3 2.x broke boto3). Always check compatibility.md BEFORE updating.
- Both files must update: Always update Pipfile AND Pipfile.lock together. Missing Pipfile changes causes CI failures.
- Branch isolation: Always create branches from
origin/main, never from another feature branch. Cross-contamination has caused multiple MR issues. - Error handling: Use
isinstance()checks before.get()on variables that might be error strings instead of dicts (e.g., when pipenv lock fails). - Local validation: Build container + run
pytest --collect-onlyto catch import errors from missing transitive dependencies before CI. - Rebase conflicts: When multiple CVE fixes are in flight, document which packages were modified to help resolve conflicts.
Required MCP Tools
Load the developer persona first:
persona_load("developer")Tools used: jira_search, jira_view_issue, jira_assign, jira_transition, jira_add_comment, git_fetch, git_branch_list, git_branch_create, git_checkout, git_add, git_commit, git_push, gitlab_mr_list, gitlab_mr_create, podman_build, podman_run, memory_session_log, jira_attach_session
Workflow
Phase 1: Discovery and Filtering
- Query Jira for CVEs:
Default component:jira_search(jql='"Downstream Component Name" ~ "<component>" AND type = Vulnerability AND resolution = Unresolved ORDER BY created DESC', max_results=50)automation-analytics-backend - Fetch latest from origin with prune to get up-to-date refs.
- Check git log on
origin/main(last 500 commits) to find already-merged fixes. - Check all branches for in-progress CVE work.
- Check open MRs for existing CVE fix MRs.
- Classify each CVE into one of:
- Merged to main - skip (already fixed)
- Has open MR - skip (fix in review)
- Has branch, no MR - resumable (prioritize these)
- Unfixed - needs work from scratch
- Select CVEs to process: Prioritize resumable CVEs over new ones. Default: process 1 at a time.
Phase 2: CVE Details and Validation
- Get CVE details from Jira using
jira_view_issue. - Extract CVE info - see cve-parsing.md for detailed extraction strategies. Need:
- CVE ID (e.g.,
CVE-2024-12345) - Affected package name (normalized to lowercase with hyphens)
- Summary, CVSS score, severity
- CVE ID (e.g.,
- Validate the CVE:
- Must have both CVE ID and affected package
- Reject non-pip packages (python, linux, glibc, java, nodejs, gcc, etc.) - these need different remediation (base image update)
- Check compatibility requirements - consult compatibility.md for known breaking changes when upgrading the affected package.
Phase 3: Resume Logic (for existing branches)
If resuming a CVE that already has a branch:
- Find the existing branch name by searching branch list for the issue key.
- Check it out (try local first, then
origin/<branch>). - Check commits ahead of
origin/mainto detect what's already done. - Check if Pipfile/Pipfile.lock are already committed.
- Check if branch is already pushed to remote.
- Skip completed steps in subsequent phases.
Phase 4: Jira Updates
- Resolve Jira username from config (must be email format, e.g.,
user@redhat.com). - Assign issue to current user.
- Set acceptance criteria if not already present:
* CVE-XXXX vulnerability in <package> is remediated * <package> is updated to a version that fixes CVE-XXXX * Pipfile and Pipfile.lock are updated with the new version * No regressions in existing functionality * CI pipeline passes - Transition to In Progress.
Phase 5: Branch Creation
Skip this phase if resuming (already on feature branch).
- Verify working directory is clean - abort if uncommitted changes exist.
- Checkout main and hard reset to
origin/main(critical for branch isolation). - Create feature branch:
<ISSUE_KEY>-<cve-id>-<package>(e.g.,AAP-12345-cve-2025-69223-aiohttp). - Verify branch base matches
origin/mainexactly (merge-base check).
Phase 6: Update Pipfile and Pipfile.lock
Skip if already committed (resume case).
This uses a container-based approach to resolve package versions with the correct Python version:
- Read Python version from the project's Pipfile
[requires]section. - Map to UBI container image:
Python Image 3.9 registry.access.redhat.com/ubi9/python-393.11 registry.access.redhat.com/ubi9/python-3113.12 registry.access.redhat.com/ubi9/python-312 - Create temp workspace in
/tmp/cve-fix-*with:- Minimal Pipfile containing just the target package (and any companion packages)
- Containerfile based on the UBI image
- Build container with
podman_build(installs pip + pipenv). - Run
pipenv lockinside the container with the temp dir volume-mounted. - Extract new version and hashes from the generated Pipfile.lock.
- Update project Pipfile:
- If package exists: update to
>= <new_version>with CVE comment - If package missing: add after
[packages]header - Update companion packages too if needed
- If package exists: update to
- Update project Pipfile.lock:
- Update version and hashes for main package
- Update companion packages
- Preserve all other packages unchanged
- Clean up temp directory.
Phase 7: Commit and Push
- Build commit message using format:
<ISSUE_KEY> - fix(deps): update <package> <old> -> <new> to fix <CVE-ID> - Stage Pipfile and Pipfile.lock.
- Commit the changes.
- Push branch to origin with
--set-upstream.
Phase 8: Create MR
- Build MR title:
<ISSUE_KEY> - fix(security): fix <CVE-ID> in <package> - Build MR description with sections:
- Summary (security fix for CVE in package)
- CVE Details (ID, package, severity, CVSS with NVD link)
- Changes (Pipfile and Pipfile.lock updates, companion packages)
- Compatibility Notes (if applicable)
- Jira link
- Testing checklist
- Completion checklist
- Create MR via
gitlab_mr_create(not draft).
Phase 9: Post-MR Actions
- Add Jira comment with MR link and change summary.
- Notify team via Slack using the
notify_teamskill withcve_fixtemplate. - Log to session memory.
- Attach session context to the Jira issue for audit trail.
- Scan fixed image via
scan_vulnerabilitiesskill (if commit SHA available). - Restore developer persona after scan.
Dry Run Mode
When dry_run is true, show what would be done without making any changes. Display the CVE status summary table and planned steps.
Output Summary
Present results as a markdown table:
| Status | Count | Issues |
| Merged to main | N | AAP-... |
| Has Open MR | N | AAP-... |
| Resumable | N | AAP-... |
| Needs Work | N | AAP-... |
For each processed CVE, show:
- Issue key, CVE ID, package, severity, CVSS
- Branch name, Python version
- Pipfile changes (old version -> new version)
- Companion package updates
- MR link
Additional Resources
- Package compatibility requirements: See references/compatibility.md for known breaking changes between packages
- CVE info extraction from Jira: See references/cve-parsing.md for multi-strategy parsing of CVE IDs and affected packages from Jira issue text
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

