security-updates
Skill10 starsChanged 38 days agoMITView on GitHub
Use when user asks about fixing security vulnerabilities, composer audit failures, vulnerable Drupal packages, or CVE advisories in a Drupal codebase.
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- linchpin/skillstheir own version, first seen Nov 1, 2026
- acquia/acquia-skills-privateedited, first seen May 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- acquia/acquia-skills-private★ 198% same
Wrote their own version · 1
- linchpin/skills★ 1same 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 repository25 other files it gives its agents.
- application-managementSkill
- codestudioSkill
- environment-managementSkill
- getting-startedSkill
- ide-managementSkill
- meo-cdn-securitySkill
- meo-codebasesSkill
- meo-deploymentsSkill
- meo-environmentsSkill
- meo-identity-accessSkill
- meo-overviewSkill
- meo-site-instancesSkill
- meo-sitesSkill
- pull-pushSkill
- remote-accessSkill
- scriptingSkill
- ssh-key-managementSkill
- trial-managementSkill
- troubleshootingSkill
- dependency-updatesSkill
- application-managementSkill
- getting-startedSkill
- pipeline-operationsSkill
- drupal-update-deploySkill
- setup-external-ci-cdSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Check the current branch first:
- Distinctive: line 35
If the user is on main, master, or any protected branch, stop and ask: "What would you like to name the new branch for these security …
- Distinctive: line 49
Only continue to the next step once the output confirms a non-protected branch.
- Very specific: line 81
Use --with-all-dependencies to allow transitive dependency version changes required by the update.
- Very specific: line 93
Update only packages flagged by the audit, staying within the version constraints in composer.json:
- Distinctive: line 127
Check the installed version matches the expected fix release.
- Distinctive: line 135
If Drush is available locally:
- Distinctive: line 204
If the update introduced a regression, restore the previous state from version control and reinstall:
- Distinctive: line 211
If the update was already committed, revert the commit:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Security Updates for Drupal with Composer
Use when:
- Running a security audit on a Drupal project
- Fixing packages flagged by
composer audit - Applying a specific security advisory
- Verifying no known vulnerabilities remain
Before You Start — Create a Branch
This step is mandatory. Do not run any composer commands until a new branch is created and confirmed. Never update packages directly on
mainormaster.
Check the current branch first:
git branch --show-currentIf the user is on main, master, or any protected branch, stop and ask: "What would you like to name the new branch for these security fixes?"
Suggest a default if they are unsure (e.g., security/drupal-updates-YYYY-MM-DD).
git checkout -b <branch-name>Confirm the new branch is active before proceeding:
git branch --show-currentOnly continue to the next step once the output confirms a non-protected branch.
Audit for Vulnerabilities
composer auditOutput lists packages with known advisories, CVE IDs, and links to the advisory.
JSON output (for scripting)
composer audit --format=jsonAudit without dev dependencies
composer audit --no-devFix a Specific Vulnerable Package
composer update drupal/package --with-all-dependenciesUse --with-all-dependencies to allow transitive dependency version changes required by the update.
Example — fix a known advisory in drupal/core
composer update drupal/core-recommended drupal/core-composer-scaffold --with-all-dependenciesFix All Packages with Advisories
Update only packages flagged by the audit, staying within the version constraints in composer.json:
composer update --with-all-dependencies $(composer audit --format=json 2>/dev/null \
| python3 -c "import sys,json; data=json.load(sys.stdin); print(' '.join(set(a['packageName'] for a in data.get('advisories', {}).values() if isinstance(a, dict)) or [v[0]['packageName'] for v in data.get('advisories', {}).values()]))" 2>/dev/null)Or update them manually after reviewing the audit output:
# List vulnerable packages from audit output, then update each
composer update drupal/package1 drupal/package2 --with-all-dependenciesVerify No Vulnerabilities Remain
composer auditExpected output after all fixes:
No security vulnerability advisories found.Confirm the updated version is installed
composer show drupal/package | grep versionsCheck the installed version matches the expected fix release. For Drupal core:
composer show drupal/core | grep versionsConfirm Drupal still bootstraps
If Drush is available locally:
drush statusExpected: Drupal bootstrap: Successful. If bootstrap fails, do not commit — investigate before proceeding.
After the audit is clean, always ask the user these questions in order:
1. "Do you want to commit these changes?"
- If yes:
git add composer.json composer.lock git commit -m "Apply Drupal security updates"- If no → remind the user that
composer.jsonandcomposer.lockare uncommitted before proceeding.2. "Do you want to deploy these changes to an Acquia environment?"
- If yes → follow the Drupal Update and Deploy playbook to push code, switch the environment, and optionally trigger a pipeline build.
- If no → done.
3. After deployment: Run database updates on the target environment before marking the work complete:
drush updb --yes drush cr
Troubleshooting
"Your requirements could not be resolved"
The version required to fix the advisory conflicts with another constraint. Options:
# Check what requires the package
composer why drupal/package
# Check what prevents the update
composer why-not drupal/package 2.x
# Relax the constraint in composer.json if safe, then retry
composer update drupal/package --with-all-dependenciesAdvisory persists after update
Composer's local advisory database may be stale. Refresh it:
composer audit --update-cache
composer auditPackage cannot be updated without breaking other packages
Pin the conflicting package temporarily and file a follow-up:
# Check the full dependency tree
composer depends drupal/conflicting-packageResolve the constraint in composer.json before retrying.
Rollback a bad update
If the update introduced a regression, restore the previous state from version control and reinstall:
git checkout composer.json composer.lock
composer installIf the update was already committed, revert the commit:
git revert HEAD
composer installBest Practices
- Run
composer auditbefore every deploy — catch new advisories early. - Use
--with-all-dependencies— security fixes often require transitive updates. - Review
composer.lockdiff — confirm only expected packages changed. - Check the advisory link — understand what the vulnerability is before updating.
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.

