fix-dependencies

द्वारा microsoft

वर्तमान ब्रांच पर npm audit का उपयोग करके सभी कमजोरियों को ठीक करें। केवल स्थानीय ब्रांच — कोई ADO/GitHub क्वेरी नहीं।

npx skills add https://github.com/microsoft/powerplatform-build-tools --skill fix-dependencies

Fix Dependencies

Fix all vulnerabilities on the current branch using npm audit. No user input required.

Scope: local branch only — no origin sync, no ADO queries, no Dependabot. For S360 / ADO / GitHub alerts use /security-alerts.


Step 1 — Audit

npm audit --json 2>&1

Build a fix list. For each vulnerability, apply the first matching rule:

ConditionAction
patched_version existsFix it — patch/minor/major all acceptable for security
inBundle: true, parent has newer versionUpgrade parent (Strategy B)
inBundle: true, no parent upgradePatch lock file directly (Strategy C)
patched_version: nullAccept risk, document, move on
scope: development + low severity + no patchAccept risk, move on

Known permanent accepted risk — do not flag: elliptic (GHSA-848j-6mx2-7j84) via rewiremock — dev-only, no patched version.


Step 2 — Fix (no pausing between fixes)

Strategy A — npm override (non-bundled transitive dep)

Add/update the entry in "overrides" in package.json, then:

npm view <pkg>@<version> version   # confirm version exists
# edit package.json overrides
npm install 2>&1
npm ls <pkg> 2>&1                  # confirm version took effect

Hard rules:

  • Never add "minimatch": "^3.x" as a flat override — infinite npm loop
  • ajv override must stay at ^6.x — v8 breaks ESLint
  • Do not change intentionally-pinned overrides (nanoid, electron-to-chromium, @types/node) unless explicitly asked

Strategy B — Direct dependency bump

Update the version in dependencies or devDependencies in package.json, then npm install.

Strategy C — Lock file patch (for inBundle: true packages)

# Find all paths for the package
node -e "
const l = require('./package-lock.json');
console.log(
  Object.keys(l.packages)
    .filter(k => k.endsWith('/<pkg>'))
    .map(k => k + ' -> ' + l.packages[k].version + ' inBundle:' + l.packages[k].inBundle)
    .join('\n')
);"

# Get safe version metadata
npm view <pkg>@<patched-version> dist.tarball dist.integrity --json

# Patch all matching entries
node -e "
const fs = require('fs');
const l = require('./package-lock.json');
Object.keys(l.packages)
  .filter(k => k.endsWith('/<pkg>'))
  .forEach(k => {
    l.packages[k].version = '<patched-version>';
    l.packages[k].resolved = '<tarball-url>';
    l.packages[k].integrity = '<integrity>';
  });
fs.writeFileSync('./package-lock.json', JSON.stringify(l, null, 2) + '\n');
console.log('Patched');
"
npm install 2>&1

Strategy D — Accept risk

Document in final summary. Do not block or ask.


Step 3 — Verify

npm audit 2>&1
npm run ci 2>&1

npm run ci functional tests will fail locally (require PA_BT_ORG_PASSWORD) — expected, not a blocker.

If npm run ci fails on a non-functional-test step (TypeScript error, lint, unit test), fix it and re-run before continuing. Do not commit a broken build.


Step 4 — Commit and PR (only if Step 3 passes)

git add package.json package-lock.json
git status   # confirm nothing accidental staged
git commit -m "chore: fix dependency vulnerabilities"

Then run /create-pr to create the pull request.


Final Summary

Print before handing off to /create-pr:

  • Fixed: package, old → new version, strategy used
  • Accepted risk: package, GHSA ID, reason

microsoft की और Skills

oss-growth
microsoft
OSS ग्रोथ हैकर व्यक्तित्व
official
accessibility-aria-expert
microsoft
React/Fluent UI वेबव्यू में पहुँच संबंधी समस्याओं का पता लगाता है और उन्हें ठीक करता है। स्क्रीन रीडर संगतता के लिए कोड की समीक्षा करते समय, ARIA लेबल ठीक करते समय, सुनिश्चित करते समय उपयोग करें…
official
generate-canvas-app
microsoft
[पुराना हो चुका है — इसके बजाय canvas-app का उपयोग करें] एक पूर्ण Power Apps कैनवास ऐप जनरेट करें।
official
django
microsoft
Django वेब डेवलपमेंट के लिए सर्वोत्तम अभ्यास जिसमें मॉडल, व्यू, टेम्पलेट और परीक्षण शामिल हैं।
official
github-issue-creator
microsoft
कच्चे नोट्स, एरर लॉग्स, वॉइस डिक्टेशन या स्क्रीनशॉट को साफ-सुथरे GitHub-फ्लेवर्ड मार्कडाउन इश्यू रिपोर्ट्स में बदलें। तब उपयोग करें जब उपयोगकर्ता बग जानकारी, एरर…
official
python-package-management
microsoft
निर्भरता प्रबंधन के लिए uv और कार्य स्वचालन के लिए poethepoet का उपयोग करता है।
official
runtime-validation
microsoft
माइग्रेटेड एप्लिकेशन के लिए रनटाइम सत्यापन — परीक्षण रणनीति (योजना चरण) और परीक्षण निष्पादन (सत्यापन चरण) को शामिल करता है: स्टार्टअप सत्यापन,…
official
azure-postgres-ts
microsoft
Azure Database for PostgreSQL Flexible Server से pg (node-postgres) पैकेज का उपयोग करके कनेक्ट करें, जिसमें पासवर्ड और Microsoft Entra ID (पासवर्डलेस) प्रमाणीकरण के लिए समर्थन है।
official