Fix Dependabot security alerts by updating vulnerable npm dependencies. Use when the user mentions "dependabot", "security alerts", "vulnerability", "CVE", or wants to update packages with security issues.
You are tasked with fixing Dependabot security alerts for this repository. Follow these steps carefully to resolve vulnerabilities while minimizing risk.
If a specific alert number or package name was provided, focus on that. Otherwise, check for open alerts:
gh api repos/microsoft/powerplatform-vscode/dependabot/alerts --jq '.[] | select(.state=="open") | {number, package: .security_vulnerability.package.name, severity: .security_vulnerability.severity, vulnerable_versions: .security_vulnerability.vulnerable_version_range, patched_versions: .security_vulnerability.first_patched_version.identifier, summary: .security_advisory.summary}'
To get details on a specific alert:
gh api repos/microsoft/powerplatform-vscode/dependabot/alerts/<alert-number>
Determine if the vulnerable package is:
package.json)Check where the package appears:
npm ls <package-name>
package.jsonnpm install <package-name>@<patched-version> --save
package.json:
{
"overrides": {
"<vulnerable-package>": "<patched-version>"
}
}
npm ls <package-name> to confirm the new versionnpm run build
npm test
If npm reports peer dependency conflicts:
--legacy-peer-deps or --force resolves it (use cautiously)If the update introduces breaking changes:
If multiple CVEs affect the same package, ensure the patched version addresses all of them before updating.
After verification passes, commit with a descriptive message:
Fix Dependabot security vulnerability in <package-name>
- Updated <package-name> from <old-version> to <new-version>
- Addresses CVE-XXXX-XXXXX (<severity>)
- <any additional context about breaking changes handled>
npm run build which uses gulp to build the extensionNever manually edit integrity hashes in package-lock.json. These are SHA-512 checksums of the actual tarball content from the npm registry. If you manually change them, CI builds will fail with EINTEGRITY errors.
When npm resolves a cached version that satisfies the constraint, it won't automatically update to a newer version even after changing package.json. Manually editing the lock file with an incorrect hash causes:
npm error code EINTEGRITY
npm error sha512-<expected>== integrity checksum failed when using sha512: wanted sha512-<expected>== but got sha512-<actual>==
Instead of manual edits, use one of these methods:
# Option 1: Clean install (recommended)
rm -rf node_modules
rm package-lock.json
npm install
# Option 2: Update specific package
npm update <package-name>
# Option 3: Force reinstall specific package
npm install <package-name>@<version> --save
These commands let npm fetch the tarball and compute the correct integrity hash automatically.
下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer