xtrm-tools 0.7.16 → 0.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.xtrm/config/hooks.json +2 -0
- package/.xtrm/config/instructions/agents-top.md +2 -1
- package/.xtrm/registry.json +432 -707
- package/.xtrm/skills/default/creating-service-skills/scripts/bootstrap.py +82 -156
- package/.xtrm/skills/default/creating-service-skills/scripts/scaffolder.py +73 -121
- package/.xtrm/skills/default/hook-development/references/patterns.md +1 -1
- package/.xtrm/skills/default/last30days/scripts/test-v1-vs-v2.sh +2 -2
- package/.xtrm/skills/default/planning/SKILL.md +75 -29
- package/.xtrm/skills/default/releasing/SKILL.md +163 -57
- package/.xtrm/skills/default/security-pipeline/SKILL.md +192 -0
- package/.xtrm/skills/default/security-pipeline/scripts/security-bootstrap.sh +294 -0
- package/.xtrm/skills/default/security-pipeline/templates/.githooks/pre-push.template +39 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/gitleaks.yml +33 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/osv-scanner.yml +33 -0
- package/.xtrm/skills/default/security-pipeline/templates/.github/workflows/semgrep.yml +41 -0
- package/.xtrm/skills/default/security-pipeline/templates/.gitleaks.toml +44 -0
- package/.xtrm/skills/default/security-pipeline/templates/.pre-commit-config.yaml +67 -0
- package/.xtrm/skills/default/security-pipeline/templates/.semgrepignore +46 -0
- package/.xtrm/skills/default/security-pipeline/templates/scripts/security-scan.sh +57 -0
- package/.xtrm/skills/default/security-pipeline/templates/scripts/semgrep-diff.sh +68 -0
- package/.xtrm/skills/default/session-close-report/SKILL.md +167 -6
- package/.xtrm/skills/default/sync-docs/SKILL.md +1 -1
- package/.xtrm/skills/default/update-specialists/SKILL.md +204 -77
- package/.xtrm/skills/default/update-xt/SKILL.md +270 -4
- package/.xtrm/skills/default/updating-service-skills/scripts/drift_detector.py +22 -0
- package/.xtrm/skills/default/using-kpi/SKILL.md +47 -5
- package/.xtrm/skills/default/using-script-specialists/SKILL.md +7 -5
- package/.xtrm/skills/default/using-specialists/SKILL.md +13 -12
- package/.xtrm/skills/default/using-specialists-auto/SKILL.md +137 -0
- package/.xtrm/skills/default/using-specialists-v2/SKILL.md +15 -22
- package/.xtrm/skills/default/using-specialists-v3/SKILL.md +1074 -0
- package/.xtrm/skills/default/vaultctl/SKILL.md +2 -2
- package/CHANGELOG.md +91 -3
- package/cli/dist/index.cjs +12425 -3770
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +9 -3
- package/package.json +27 -7
- package/packages/pi-extensions/extensions/xtrm-ui/index.ts +76 -1
- package/packages/pi-extensions/package.json +1 -1
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.combined.log +0 -7
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.stderr.log +0 -0
- package/.xtrm/config/pi/extensions/custom-footer/.pi/structured-returns/83051fe4-97da-4e2c-bdaa-343b32f4e714.stdout.log +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/LICENSE +0 -22
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/README.md +0 -29
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.d.ts +0 -3
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.js +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/index.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chrome.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.d.ts +0 -11
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.js +0 -100
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/crypto.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.d.ts +0 -25
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.js +0 -104
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/linuxKeyring.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.d.ts +0 -10
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.js +0 -293
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/shared.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.d.ts +0 -10
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.js +0 -26
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqlite/windowsDpapi.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.js +0 -51
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteLinux.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.js +0 -60
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteMac.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.js +0 -38
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromeSqliteWindows.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.d.ts +0 -5
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.js +0 -33
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/linuxPaths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.d.ts +0 -24
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.js +0 -30
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/macosKeychain.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.d.ts +0 -11
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.js +0 -43
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/paths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.js +0 -41
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsMasterKey.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.js +0 -53
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/chromium/windowsPaths.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edge.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.js +0 -53
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteLinux.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.js +0 -60
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteMac.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.d.ts +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.js +0 -38
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/edgeSqliteWindows.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.d.ts +0 -6
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.js +0 -257
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/firefoxSqlite.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.js +0 -71
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/inline.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.d.ts +0 -6
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.js +0 -173
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/providers/safariBinaryCookies.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.d.ts +0 -26
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.js +0 -195
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/public.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.d.ts +0 -121
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.js +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/types.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.js +0 -18
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/base64.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.d.ts +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.js +0 -110
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/exec.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.js +0 -32
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/expire.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.js +0 -13
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/fs.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.js +0 -7
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/hostMatch.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.d.ts +0 -5
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.js +0 -58
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/nodeSqlite.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.js +0 -27
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/origins.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.d.ts +0 -2
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.d.ts.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.js +0 -8
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/dist/util/runtime.js.map +0 -1
- package/.xtrm/skills/default/last30days/scripts/lib/vendor/bird-search/node_modules/@steipete/sweet-cookie/package.json +0 -40
- package/.xtrm/skills/default/planning/evals/evals.json +0 -19
- package/.xtrm/skills/default/quality-gates/evals/evals.json +0 -181
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/FINAL-EVAL-SUMMARY.md +0 -75
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/edge-case-auto-fix-verification/with_skill/outputs/response.md +0 -59
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/edge-case-mixed-language-project/with_skill/outputs/response.md +0 -60
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/eval-summary.md +0 -105
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/partial-install-python-only/with_skill/outputs/response.md +0 -93
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/python-refactor-request/with_skill/outputs/response.md +0 -104
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/quality-gate-error-fix/with_skill/outputs/response.md +0 -74
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-general-chat/with_skill/outputs/response.md +0 -18
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-math-question/with_skill/outputs/response.md +0 -18
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/should-not-trigger-unrelated-coding/with_skill/outputs/response.md +0 -56
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/tdd-guard-blocking-confusion/with_skill/outputs/response.md +0 -67
- package/.xtrm/skills/default/quality-gates/workspace/iteration-1/typescript-feature-with-tests/with_skill/outputs/response.md +0 -97
- package/.xtrm/skills/default/sync-docs/evals/evals.json +0 -89
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/benchmark.json +0 -293
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +0 -210
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +0 -101
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +0 -198
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +0 -94
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +0 -237
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +0 -134
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +0 -28
- package/.xtrm/skills/default/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/benchmark.json +0 -297
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +0 -137
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +0 -92
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +0 -134
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +0 -86
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +0 -193
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +0 -72
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +0 -211
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +0 -91
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +0 -182
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +0 -222
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +0 -88
- package/.xtrm/skills/default/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/benchmark.json +0 -298
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/benchmark.md +0 -13
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +0 -125
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +0 -97
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +0 -144
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +0 -78
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +0 -104
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +0 -91
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +0 -79
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +0 -82
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +0 -27
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +0 -302
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +0 -33
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +0 -114
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +0 -118
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +0 -38
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +0 -158
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +0 -71
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +0 -90
- package/.xtrm/skills/default/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
- package/.xtrm/skills/default/test-planning/evals/evals.json +0 -23
- package/.xtrm/skills/default/using-specialists/SKILL.safe.md +0 -1082
- package/.xtrm/skills/default/using-specialists/SKILL.ultra.md +0 -1082
- package/.xtrm/skills/default/using-specialists/evals/evals.json +0 -68
- package/packages/pi-extensions/.serena/project.yml +0 -130
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Bootstrap the Mercury security pipeline on a target repo.
|
|
3
|
+
# Reference doc: SECURITY-PIPELINE.md
|
|
4
|
+
#
|
|
5
|
+
# Usage: ./scripts/security-bootstrap.sh <target-repo-path>
|
|
6
|
+
#
|
|
7
|
+
# What it does:
|
|
8
|
+
# 1. Copies the 11 baseline files (warns on conflicts; never overwrites silently)
|
|
9
|
+
# 2. Detects package ecosystems and writes a tailored dependabot.yml
|
|
10
|
+
# 3. Opens a feat(security) PR via gh
|
|
11
|
+
# 4. Enables Dependabot/Secret scanning/Push protection via `gh api`
|
|
12
|
+
#
|
|
13
|
+
# What you still do manually:
|
|
14
|
+
# - Codex Connector install (UI: chatgpt.com/codex/cloud/settings/general)
|
|
15
|
+
# - Branch protection rule (won't enforce on free tier but document intent)
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
if [ $# -lt 1 ]; then
|
|
20
|
+
echo "Usage: $0 <target-repo-path>" >&2
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
TARGET="$(cd "$1" && pwd)"
|
|
25
|
+
SOURCE="$(cd "$(dirname "$0")/.." && pwd)"
|
|
26
|
+
|
|
27
|
+
if [ ! -d "$TARGET/.git" ]; then
|
|
28
|
+
echo "❌ $TARGET is not a git repository" >&2
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
cd "$TARGET"
|
|
33
|
+
SLUG=$(gh repo view --json nameWithOwner --jq .nameWithOwner 2>/dev/null || echo "?")
|
|
34
|
+
echo "── Target: $TARGET ($SLUG) ──"
|
|
35
|
+
|
|
36
|
+
# ── 1. Detect ecosystems for dependabot.yml ───────────────────────────────
|
|
37
|
+
ECOSYSTEMS=()
|
|
38
|
+
# pip ecosystem covers BOTH requirements*.txt and pyproject.toml — emit a
|
|
39
|
+
# single 'pip' entry to avoid duplicate dependabot blocks for /.
|
|
40
|
+
HAS_PIP=0
|
|
41
|
+
if [ -f requirements.txt ] || find . -maxdepth 3 -name 'requirements*.txt' -not -path '*/node_modules/*' -print -quit | grep -q .; then
|
|
42
|
+
HAS_PIP=1
|
|
43
|
+
fi
|
|
44
|
+
[ -f pyproject.toml ] && HAS_PIP=1
|
|
45
|
+
[ "$HAS_PIP" = "1" ] && ECOSYSTEMS+=("pip")
|
|
46
|
+
[ -f package.json ] && [ "$(cat package.json | python3 -c 'import json,sys;d=json.load(sys.stdin);print(len(d))' 2>/dev/null)" -gt 1 ] && ECOSYSTEMS+=("npm")
|
|
47
|
+
find . -maxdepth 5 -name 'Dockerfile' -not -path '*/node_modules/*' -print -quit | grep -q . && ECOSYSTEMS+=("docker")
|
|
48
|
+
[ -f go.mod ] && ECOSYSTEMS+=("gomod")
|
|
49
|
+
[ -f Cargo.toml ] && ECOSYSTEMS+=("cargo")
|
|
50
|
+
ECOSYSTEMS+=("github-actions") # always
|
|
51
|
+
|
|
52
|
+
echo " Detected ecosystems: ${ECOSYSTEMS[*]}"
|
|
53
|
+
|
|
54
|
+
# ── 2. Branch ─────────────────────────────────────────────────────────────
|
|
55
|
+
BRANCH="feat/security-bootstrap-$(date +%Y%m%d)"
|
|
56
|
+
git fetch origin --quiet
|
|
57
|
+
git checkout -b "$BRANCH" 2>/dev/null || git checkout "$BRANCH"
|
|
58
|
+
|
|
59
|
+
# ── 3. Copy files (conflict-aware) ────────────────────────────────────────
|
|
60
|
+
copy_file() {
|
|
61
|
+
local rel="$1"
|
|
62
|
+
# Try templates/ first (skill layout), then SOURCE root (mercury-infra layout)
|
|
63
|
+
local src="$SOURCE/templates/$rel"
|
|
64
|
+
[ -f "$src" ] || src="$SOURCE/$rel"
|
|
65
|
+
local dst="$TARGET/$rel"
|
|
66
|
+
if [ ! -f "$src" ]; then
|
|
67
|
+
echo " ⚠️ source missing: $rel (looked in templates/ and root)"
|
|
68
|
+
return
|
|
69
|
+
fi
|
|
70
|
+
mkdir -p "$(dirname "$dst")"
|
|
71
|
+
if [ -f "$dst" ]; then
|
|
72
|
+
if cmp -s "$src" "$dst"; then
|
|
73
|
+
echo " ✓ $rel (already identical)"
|
|
74
|
+
else
|
|
75
|
+
echo " ⚠️ $rel exists and differs — backing up to $rel.bak"
|
|
76
|
+
cp "$dst" "$dst.bak"
|
|
77
|
+
cp "$src" "$dst"
|
|
78
|
+
fi
|
|
79
|
+
else
|
|
80
|
+
cp "$src" "$dst"
|
|
81
|
+
echo " + $rel"
|
|
82
|
+
fi
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
echo "── Copying baseline files ──"
|
|
86
|
+
copy_file .github/workflows/osv-scanner.yml
|
|
87
|
+
copy_file .github/workflows/semgrep.yml
|
|
88
|
+
copy_file .github/workflows/gitleaks.yml
|
|
89
|
+
copy_file .gitleaks.toml
|
|
90
|
+
copy_file .semgrepignore
|
|
91
|
+
copy_file .pre-commit-config.yaml
|
|
92
|
+
copy_file scripts/semgrep-diff.sh
|
|
93
|
+
copy_file scripts/security-scan.sh
|
|
94
|
+
|
|
95
|
+
# Ensure scripts are executable
|
|
96
|
+
chmod +x "$TARGET/scripts/semgrep-diff.sh" "$TARGET/scripts/security-scan.sh" 2>/dev/null || true
|
|
97
|
+
|
|
98
|
+
# ── 4. Generate dependabot.yml tailored to ecosystems ─────────────────────
|
|
99
|
+
DEPABOT="$TARGET/.github/dependabot.yml"
|
|
100
|
+
if [ -f "$DEPABOT" ]; then
|
|
101
|
+
echo " ⚠️ $DEPABOT exists — leaving untouched (review manually)"
|
|
102
|
+
else
|
|
103
|
+
{
|
|
104
|
+
echo "# Dependabot — generated by security-bootstrap.sh on $(date +%F)"
|
|
105
|
+
echo "version: 2"
|
|
106
|
+
echo "updates:"
|
|
107
|
+
for eco in "${ECOSYSTEMS[@]}"; do
|
|
108
|
+
case "$eco" in
|
|
109
|
+
pip)
|
|
110
|
+
cat <<'EOF'
|
|
111
|
+
- package-ecosystem: pip
|
|
112
|
+
directory: /
|
|
113
|
+
schedule:
|
|
114
|
+
interval: weekly
|
|
115
|
+
day: monday
|
|
116
|
+
time: "06:00"
|
|
117
|
+
timezone: Europe/Rome
|
|
118
|
+
open-pull-requests-limit: 5
|
|
119
|
+
labels: [dependencies, python]
|
|
120
|
+
groups:
|
|
121
|
+
python-minor-and-patch:
|
|
122
|
+
update-types: [minor, patch]
|
|
123
|
+
EOF
|
|
124
|
+
;;
|
|
125
|
+
npm)
|
|
126
|
+
cat <<'EOF'
|
|
127
|
+
- package-ecosystem: npm
|
|
128
|
+
directory: /
|
|
129
|
+
schedule:
|
|
130
|
+
interval: weekly
|
|
131
|
+
day: monday
|
|
132
|
+
open-pull-requests-limit: 5
|
|
133
|
+
labels: [dependencies, javascript]
|
|
134
|
+
groups:
|
|
135
|
+
npm-minor-and-patch:
|
|
136
|
+
update-types: [minor, patch]
|
|
137
|
+
EOF
|
|
138
|
+
;;
|
|
139
|
+
docker)
|
|
140
|
+
cat <<'EOF'
|
|
141
|
+
- package-ecosystem: docker
|
|
142
|
+
directory: /
|
|
143
|
+
schedule:
|
|
144
|
+
interval: weekly
|
|
145
|
+
day: monday
|
|
146
|
+
open-pull-requests-limit: 3
|
|
147
|
+
labels: [dependencies, docker]
|
|
148
|
+
EOF
|
|
149
|
+
;;
|
|
150
|
+
gomod)
|
|
151
|
+
cat <<'EOF'
|
|
152
|
+
- package-ecosystem: gomod
|
|
153
|
+
directory: /
|
|
154
|
+
schedule:
|
|
155
|
+
interval: weekly
|
|
156
|
+
day: monday
|
|
157
|
+
open-pull-requests-limit: 5
|
|
158
|
+
labels: [dependencies, go]
|
|
159
|
+
EOF
|
|
160
|
+
;;
|
|
161
|
+
cargo)
|
|
162
|
+
cat <<'EOF'
|
|
163
|
+
- package-ecosystem: cargo
|
|
164
|
+
directory: /
|
|
165
|
+
schedule:
|
|
166
|
+
interval: weekly
|
|
167
|
+
day: monday
|
|
168
|
+
open-pull-requests-limit: 5
|
|
169
|
+
labels: [dependencies, rust]
|
|
170
|
+
EOF
|
|
171
|
+
;;
|
|
172
|
+
github-actions)
|
|
173
|
+
cat <<'EOF'
|
|
174
|
+
- package-ecosystem: github-actions
|
|
175
|
+
directory: /
|
|
176
|
+
schedule:
|
|
177
|
+
interval: weekly
|
|
178
|
+
day: monday
|
|
179
|
+
open-pull-requests-limit: 3
|
|
180
|
+
labels: [dependencies, github-actions]
|
|
181
|
+
groups:
|
|
182
|
+
actions-all:
|
|
183
|
+
patterns: ["*"]
|
|
184
|
+
EOF
|
|
185
|
+
;;
|
|
186
|
+
esac
|
|
187
|
+
done
|
|
188
|
+
} > "$DEPABOT"
|
|
189
|
+
echo " + .github/dependabot.yml ($(echo "${ECOSYSTEMS[*]}" | wc -w) ecosystems)"
|
|
190
|
+
fi
|
|
191
|
+
|
|
192
|
+
# ── 5. .githooks/pre-push (install wrapper if existing, install baseline if absent) ──
|
|
193
|
+
# Codex-audit-driven design (do NOT regress): existing pre-push hooks may
|
|
194
|
+
# (a) end with `exit 0` — appending baseline makes it unreachable
|
|
195
|
+
# (b) read stdin (push refs) — single-pass, baseline would see EOF
|
|
196
|
+
# Solution: when a pre-push exists, move it to pre-push.local and install a
|
|
197
|
+
# managed wrapper that runs baseline FIRST (preserving stdin via tee) and
|
|
198
|
+
# then re-feeds stdin to pre-push.local.
|
|
199
|
+
PREPUSH_SRC=""
|
|
200
|
+
for cand in "$SOURCE/templates/.githooks/pre-push.template" "$SOURCE/.githooks/pre-push"; do
|
|
201
|
+
[ -f "$cand" ] && PREPUSH_SRC="$cand" && break
|
|
202
|
+
done
|
|
203
|
+
if [ -z "$PREPUSH_SRC" ]; then
|
|
204
|
+
echo " ⚠️ no pre-push baseline found; skipping hooks"
|
|
205
|
+
else
|
|
206
|
+
mkdir -p "$TARGET/.githooks"
|
|
207
|
+
BASELINE="$TARGET/.githooks/.security-pipeline-baseline"
|
|
208
|
+
cp "$PREPUSH_SRC" "$BASELINE"
|
|
209
|
+
chmod +x "$BASELINE"
|
|
210
|
+
if [ -f "$TARGET/.githooks/pre-push" ] && ! grep -q "security-pipeline-managed-wrapper" "$TARGET/.githooks/pre-push" 2>/dev/null; then
|
|
211
|
+
# Existing hook present and not yet our wrapper — move it aside.
|
|
212
|
+
# Preserve any pre-existing pre-push.local first so we never clobber it.
|
|
213
|
+
if [ -f "$TARGET/.githooks/pre-push.local" ]; then
|
|
214
|
+
ts=$(date +%s)
|
|
215
|
+
mv "$TARGET/.githooks/pre-push.local" "$TARGET/.githooks/pre-push.local.bak.$ts"
|
|
216
|
+
echo " ↪ existing pre-push.local preserved as pre-push.local.bak.$ts"
|
|
217
|
+
fi
|
|
218
|
+
mv "$TARGET/.githooks/pre-push" "$TARGET/.githooks/pre-push.local"
|
|
219
|
+
chmod +x "$TARGET/.githooks/pre-push.local"
|
|
220
|
+
echo " ↪ existing .githooks/pre-push moved to pre-push.local"
|
|
221
|
+
fi
|
|
222
|
+
cat > "$TARGET/.githooks/pre-push" <<'WRAPEOF'
|
|
223
|
+
#!/usr/bin/env bash
|
|
224
|
+
# security-pipeline-managed-wrapper — installed by security-bootstrap.sh
|
|
225
|
+
# Runs the security baseline first, then any user-local pre-push hook.
|
|
226
|
+
# Both receive the original push refs on stdin.
|
|
227
|
+
set -uo pipefail
|
|
228
|
+
|
|
229
|
+
REFS=$(cat)
|
|
230
|
+
HOOKS_DIR=$(dirname "$0")
|
|
231
|
+
|
|
232
|
+
# 1. Baseline: anti-direct-main + pre-commit pre-push chain
|
|
233
|
+
if [ -x "$HOOKS_DIR/.security-pipeline-baseline" ]; then
|
|
234
|
+
echo "$REFS" | "$HOOKS_DIR/.security-pipeline-baseline" "$@"
|
|
235
|
+
rc=$?
|
|
236
|
+
[ $rc -ne 0 ] && exit $rc
|
|
237
|
+
fi
|
|
238
|
+
|
|
239
|
+
# 2. User-local hook (preserves any pre-existing logic)
|
|
240
|
+
if [ -x "$HOOKS_DIR/pre-push.local" ]; then
|
|
241
|
+
echo "$REFS" | "$HOOKS_DIR/pre-push.local" "$@"
|
|
242
|
+
rc=$?
|
|
243
|
+
[ $rc -ne 0 ] && exit $rc
|
|
244
|
+
fi
|
|
245
|
+
|
|
246
|
+
exit 0
|
|
247
|
+
WRAPEOF
|
|
248
|
+
chmod +x "$TARGET/.githooks/pre-push"
|
|
249
|
+
echo " + .githooks/pre-push (managed wrapper) + .security-pipeline-baseline"
|
|
250
|
+
fi
|
|
251
|
+
|
|
252
|
+
# ── 6. Commit + PR ────────────────────────────────────────────────────────
|
|
253
|
+
git add .github .gitleaks.toml .semgrepignore .pre-commit-config.yaml scripts/ .githooks/ 2>/dev/null || true
|
|
254
|
+
if git diff --cached --quiet; then
|
|
255
|
+
echo "── No changes to commit ──"
|
|
256
|
+
else
|
|
257
|
+
git commit -m "feat(security): bootstrap Mercury security pipeline
|
|
258
|
+
|
|
259
|
+
Mirrors mercury-infra security baseline. See SECURITY-PIPELINE.md in
|
|
260
|
+
mercury-infra for the full reference.
|
|
261
|
+
|
|
262
|
+
Includes: dependabot, osv-scanner, semgrep, gitleaks, pre-commit hooks,
|
|
263
|
+
anti-direct-main-push, local audit scripts.
|
|
264
|
+
|
|
265
|
+
Detected ecosystems: ${ECOSYSTEMS[*]}
|
|
266
|
+
|
|
267
|
+
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>" --no-verify
|
|
268
|
+
git push -u origin "$BRANCH" --no-verify
|
|
269
|
+
PR_URL=$(gh pr create --fill 2>&1 | grep -oE 'https://github.com/[^ ]+/pull/[0-9]+' | head -1)
|
|
270
|
+
echo "── PR opened: $PR_URL ──"
|
|
271
|
+
fi
|
|
272
|
+
|
|
273
|
+
# ── 7. Enable security features via gh api ────────────────────────────────
|
|
274
|
+
echo "── Enabling repo security features ──"
|
|
275
|
+
gh api -X PATCH "/repos/$SLUG" \
|
|
276
|
+
-f 'security_and_analysis[secret_scanning][status]=enabled' \
|
|
277
|
+
-f 'security_and_analysis[secret_scanning_push_protection][status]=enabled' \
|
|
278
|
+
>/dev/null 2>&1 && echo " ✓ secret scanning + push protection" || echo " ⚠️ secret scanning toggle failed (may already be on, or needs higher token scope)"
|
|
279
|
+
|
|
280
|
+
gh api -X PUT "/repos/$SLUG/vulnerability-alerts" >/dev/null 2>&1 \
|
|
281
|
+
&& echo " ✓ Dependabot alerts" || echo " ⚠️ vulnerability alerts toggle failed"
|
|
282
|
+
|
|
283
|
+
gh api -X PUT "/repos/$SLUG/automated-security-fixes" >/dev/null 2>&1 \
|
|
284
|
+
&& echo " ✓ Dependabot security updates" || echo " ⚠️ automated security fixes toggle failed"
|
|
285
|
+
|
|
286
|
+
echo
|
|
287
|
+
echo "✅ Bootstrap complete for $SLUG"
|
|
288
|
+
echo
|
|
289
|
+
echo "Manual follow-up:"
|
|
290
|
+
echo " 1. Install Codex Connector: https://chatgpt.com/codex/cloud/settings/general"
|
|
291
|
+
echo " 2. Settings → Branches → Add classic protection rule for main"
|
|
292
|
+
echo " Required checks: OSV scan, Semgrep scan, Gitleaks scan"
|
|
293
|
+
echo " 3. cd $TARGET && make install-hooks"
|
|
294
|
+
echo " 4. After PR merges, verify the three CI checks turn green"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Pre-push hook chain.
|
|
3
|
+
# Install once per clone: git config core.hooksPath .githooks
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
# ── Block direct push to protected branches ──────────────────────────────
|
|
7
|
+
PROTECTED_BRANCHES="main master"
|
|
8
|
+
remote="${1:-origin}"
|
|
9
|
+
|
|
10
|
+
while read -r local_ref local_sha remote_ref remote_sha; do
|
|
11
|
+
# Block by destination ref — covers `git push origin HEAD:main` etc.
|
|
12
|
+
branch="${remote_ref#refs/heads/}"
|
|
13
|
+
for protected in $PROTECTED_BRANCHES; do
|
|
14
|
+
if [ "$branch" = "$protected" ]; then
|
|
15
|
+
echo "🚫 Direct push to '$protected' blocked." >&2
|
|
16
|
+
echo "" >&2
|
|
17
|
+
echo "Open a PR instead:" >&2
|
|
18
|
+
echo " git checkout -b feature/<id>-<slug>" >&2
|
|
19
|
+
echo " git push -u origin <branch>" >&2
|
|
20
|
+
echo " gh pr create --fill" >&2
|
|
21
|
+
echo " gh pr merge --auto --squash --delete-branch" >&2
|
|
22
|
+
echo "" >&2
|
|
23
|
+
echo "Bypass (emergency only): git push --no-verify" >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
done
|
|
27
|
+
done < /dev/stdin
|
|
28
|
+
|
|
29
|
+
# ── Existing: skill-staleness check ──────────────────────────────────────
|
|
30
|
+
if command -v python3 &>/dev/null && [ -f "/home/dawid/projects/jaggers-agent-tools/project-skills/service-skills-set/.claude/git-hooks/skill_staleness.py" ]; then
|
|
31
|
+
python3 "/home/dawid/projects/jaggers-agent-tools/project-skills/service-skills-set/.claude/git-hooks/skill_staleness.py" || true
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# pre-commit framework: push-stage hooks (semgrep, osv-scanner)
|
|
35
|
+
if command -v pre-commit &>/dev/null && [ -f .pre-commit-config.yaml ]; then
|
|
36
|
+
pre-commit run --hook-stage pre-push --all-files || exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
exit 0
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Gitleaks
|
|
2
|
+
|
|
3
|
+
# Backstop scan for committed secrets (full history on push to main, diff on PRs).
|
|
4
|
+
# GitHub push protection is the primary gate; this catches anything pre-existing
|
|
5
|
+
# or pushed from a client without push protection enabled.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main]
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: "0 6 * * 1" # Monday 06:00 UTC weekly
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
pull-requests: write # write needed to post the leak summary comment on PRs
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
gitleaks:
|
|
21
|
+
name: Gitleaks scan
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0 # full history for scheduled deep scans
|
|
28
|
+
|
|
29
|
+
- name: Gitleaks
|
|
30
|
+
uses: gitleaks/gitleaks-action@v2
|
|
31
|
+
env:
|
|
32
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
# GITLEAKS_LICENSE only required for org accounts; private user repos run free.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: OSV Scanner
|
|
2
|
+
|
|
3
|
+
# Vulnerability scanner from Google's OSV.dev — replaces Dependency Review on
|
|
4
|
+
# user-private repos where Dependency Review (a GHAS feature) is unavailable.
|
|
5
|
+
# Scans manifests + lockfiles against the OSV.dev database.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main, master] # scan immediately after every merge
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main, master]
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: "0 6 * * 1" # Monday 06:00 UTC weekly
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
scan:
|
|
20
|
+
name: OSV scan
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Run OSV-Scanner
|
|
27
|
+
uses: google/osv-scanner-action/osv-scanner-action@v2
|
|
28
|
+
with:
|
|
29
|
+
# Note: --skip-git was removed in v2.3+. Recursive scan walks the
|
|
30
|
+
# working tree and respects .gitignore by default.
|
|
31
|
+
scan-args: |-
|
|
32
|
+
--recursive
|
|
33
|
+
./
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Semgrep
|
|
2
|
+
|
|
3
|
+
# SAST scanner — replaces CodeQL on private user-owned repos where GitHub
|
|
4
|
+
# Advanced Security is unavailable. Free, runs entirely in CI.
|
|
5
|
+
#
|
|
6
|
+
# Diff-aware: on PRs, semgrep ci auto-compares HEAD against the base branch
|
|
7
|
+
# and only flags NEW findings. We do NOT trigger on push to main because
|
|
8
|
+
# `semgrep ci` has no baseline there and would re-flag pre-existing debt
|
|
9
|
+
# every commit. The weekly schedule covers the full-scan use case.
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [main, master]
|
|
14
|
+
schedule:
|
|
15
|
+
- cron: "0 6 * * 1" # Monday 06:00 UTC weekly
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
semgrep:
|
|
22
|
+
name: Semgrep scan
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
container:
|
|
25
|
+
image: semgrep/semgrep
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0 # full history for baseline diff
|
|
31
|
+
|
|
32
|
+
- name: Semgrep CI
|
|
33
|
+
run: semgrep ci
|
|
34
|
+
env:
|
|
35
|
+
SEMGREP_RULES: >-
|
|
36
|
+
p/default
|
|
37
|
+
p/security-audit
|
|
38
|
+
p/secrets
|
|
39
|
+
p/python
|
|
40
|
+
p/dockerfile
|
|
41
|
+
p/github-actions
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Gitleaks config — extends default rules with project-specific allowlists.
|
|
2
|
+
# Docs: https://github.com/gitleaks/gitleaks/blob/master/README.md#configuration
|
|
3
|
+
|
|
4
|
+
[extend]
|
|
5
|
+
useDefault = true
|
|
6
|
+
|
|
7
|
+
[allowlist]
|
|
8
|
+
description = "Mercury allowlist"
|
|
9
|
+
# Historical fingerprints already triaged — kept as acknowledgments so CI's
|
|
10
|
+
# full-history scan stays green. New leaks still trip; only these specific
|
|
11
|
+
# (commit, file, rule, line) tuples are exempt.
|
|
12
|
+
stopwords = []
|
|
13
|
+
regexes = [
|
|
14
|
+
'''admin:PASSWORD''', # placeholder in earlier grafana docs (now uses $GRAFANA_ADMIN_PW)
|
|
15
|
+
]
|
|
16
|
+
paths = [
|
|
17
|
+
# Local secrets (gitignored — never committed). The --no-git scan walks
|
|
18
|
+
# the filesystem so these get visited; in CI git history they don't exist.
|
|
19
|
+
# NOTE: narrow patterns only — never blanket-allowlist .env.* because
|
|
20
|
+
# tracked files like .env.production with real credentials would be ignored.
|
|
21
|
+
'''^\.env$''',
|
|
22
|
+
'''^\.env\.local$''',
|
|
23
|
+
'''^\.env\.development\.local$''',
|
|
24
|
+
'''^\.env\.test\.local$''',
|
|
25
|
+
'''^\.env\.production\.local$''',
|
|
26
|
+
'''^\.env\.example$''',
|
|
27
|
+
|
|
28
|
+
# Beads issue tracker — JSONL exports of issues + memories.
|
|
29
|
+
# High-entropy strings (memory keys, dolt commit hashes) trip generic-api-key.
|
|
30
|
+
# If a real secret ends up in a memory, it's a separate hygiene problem;
|
|
31
|
+
# gitleaks scanning the export is not the right gate.
|
|
32
|
+
'''^\.beads/.*''',
|
|
33
|
+
|
|
34
|
+
# Specialist runtime state and local DB caches.
|
|
35
|
+
'''^\.specialists/db/.*''',
|
|
36
|
+
'''^\.specialists/jobs/.*''',
|
|
37
|
+
'''^\.specialists/ready/.*''',
|
|
38
|
+
|
|
39
|
+
# Dolt internal storage.
|
|
40
|
+
'''^\.dolt/.*''',
|
|
41
|
+
|
|
42
|
+
# XTRM runtime claim file.
|
|
43
|
+
'''^\.xtrm/statusline-claim$''',
|
|
44
|
+
]
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Pre-commit — local mirror of CI security gates.
|
|
2
|
+
#
|
|
3
|
+
# Two stages:
|
|
4
|
+
# - commit → fast checks (gitleaks staged-diff, ruff, hygiene) ~1s
|
|
5
|
+
# - push → heavy checks (semgrep, osv-scanner) ~30s
|
|
6
|
+
#
|
|
7
|
+
# Install once per clone:
|
|
8
|
+
# pipx install pre-commit
|
|
9
|
+
# pre-commit install # registers commit-stage hook
|
|
10
|
+
# pre-commit install --hook-type pre-push # registers push-stage hook
|
|
11
|
+
#
|
|
12
|
+
# Run on demand:
|
|
13
|
+
# pre-commit run --all-files # commit-stage on all files
|
|
14
|
+
# pre-commit run --hook-stage pre-push --all-files
|
|
15
|
+
|
|
16
|
+
default_install_hook_types: [pre-commit, pre-push]
|
|
17
|
+
default_stages: [pre-commit] # hooks opt-in to pre-push via explicit stages: [pre-push]
|
|
18
|
+
|
|
19
|
+
repos:
|
|
20
|
+
# ── commit stage: fast hygiene + secret scan ──────────────────────────────
|
|
21
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
22
|
+
rev: v5.0.0
|
|
23
|
+
hooks:
|
|
24
|
+
- id: trailing-whitespace
|
|
25
|
+
- id: end-of-file-fixer
|
|
26
|
+
- id: check-yaml
|
|
27
|
+
args: [--allow-multiple-documents]
|
|
28
|
+
- id: check-json
|
|
29
|
+
- id: check-merge-conflict
|
|
30
|
+
- id: check-added-large-files
|
|
31
|
+
args: [--maxkb=1024]
|
|
32
|
+
- id: detect-private-key
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
35
|
+
rev: v8.21.2
|
|
36
|
+
hooks:
|
|
37
|
+
- id: gitleaks # uses .gitleaks.toml allowlist
|
|
38
|
+
|
|
39
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
40
|
+
rev: v0.8.4
|
|
41
|
+
hooks:
|
|
42
|
+
- id: ruff
|
|
43
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
44
|
+
- id: ruff-format
|
|
45
|
+
|
|
46
|
+
# ── push stage: heavy SAST + vuln scans (mirror of CI) ────────────────────
|
|
47
|
+
- repo: local
|
|
48
|
+
hooks:
|
|
49
|
+
- id: semgrep
|
|
50
|
+
name: semgrep (push, diff-only vs origin/main)
|
|
51
|
+
stages: [pre-push]
|
|
52
|
+
language: system
|
|
53
|
+
pass_filenames: false
|
|
54
|
+
# Diff-only: only flags NEW findings vs origin/main (same as CI `semgrep ci`).
|
|
55
|
+
# CI's full scan remains the source of truth for absolute findings.
|
|
56
|
+
entry: ./scripts/semgrep-diff.sh
|
|
57
|
+
|
|
58
|
+
- repo: local
|
|
59
|
+
hooks:
|
|
60
|
+
- id: osv-scanner
|
|
61
|
+
name: osv-scanner (push)
|
|
62
|
+
stages: [pre-push]
|
|
63
|
+
language: system
|
|
64
|
+
pass_filenames: false
|
|
65
|
+
# Skips silently if osv-scanner is not installed locally —
|
|
66
|
+
# CI will catch it. To install: go install github.com/google/osv-scanner/cmd/osv-scanner@latest
|
|
67
|
+
entry: bash -c 'if command -v osv-scanner >/dev/null; then osv-scanner --recursive ./; else echo "osv-scanner not installed locally — skipping (CI covers it)"; fi'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Semgrep ignores — same spirit as .gitleaks.toml allowlist.
|
|
2
|
+
# Excludes machine-generated, externally-synced, or runtime-state directories
|
|
3
|
+
# that aren't part of this repo's review/security boundary.
|
|
4
|
+
|
|
5
|
+
.beads/
|
|
6
|
+
.specialists/
|
|
7
|
+
.dolt/
|
|
8
|
+
.bv/
|
|
9
|
+
.emdash/
|
|
10
|
+
.gitnexus
|
|
11
|
+
data/
|
|
12
|
+
logs/
|
|
13
|
+
grafana/data/
|
|
14
|
+
traefik/logs/
|
|
15
|
+
|
|
16
|
+
# .xtrm/ runtime + cache + non-security skills.
|
|
17
|
+
# We DO scan the security-pipeline skill source because its scripts ship
|
|
18
|
+
# into target repos and must be SAST-clean. Use blanket exclude + explicit
|
|
19
|
+
# unignore so new skills don't silently become scan targets.
|
|
20
|
+
.xtrm/state.json
|
|
21
|
+
.xtrm/statusline-claim
|
|
22
|
+
.xtrm/logs/
|
|
23
|
+
.xtrm/cache/
|
|
24
|
+
.xtrm/config/
|
|
25
|
+
.xtrm/ext-src/
|
|
26
|
+
.xtrm/packages/
|
|
27
|
+
.xtrm/hooks/
|
|
28
|
+
.xtrm/skills/active/
|
|
29
|
+
.xtrm/skills/optional/
|
|
30
|
+
.xtrm/skills/user/
|
|
31
|
+
# Use glob '*' on immediate children so the parent stays included; this lets
|
|
32
|
+
# the negation actually re-include security-pipeline (gitignore semantics
|
|
33
|
+
# refuse to descend into an excluded parent directory).
|
|
34
|
+
.xtrm/skills/default/*
|
|
35
|
+
!.xtrm/skills/default/security-pipeline
|
|
36
|
+
|
|
37
|
+
# Test fixtures and snapshots — false positive heavy
|
|
38
|
+
**/test_fixtures/
|
|
39
|
+
**/snapshots/
|
|
40
|
+
|
|
41
|
+
# Lock files
|
|
42
|
+
package-lock.json
|
|
43
|
+
pnpm-lock.yaml
|
|
44
|
+
yarn.lock
|
|
45
|
+
poetry.lock
|
|
46
|
+
Pipfile.lock
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Local security AUDIT — informational, never fails.
|
|
3
|
+
# Surfaces all findings (including pre-existing debt) so you can triage.
|
|
4
|
+
# The blocking gate is the pre-push hook (diff-only); CI is the SoT.
|
|
5
|
+
#
|
|
6
|
+
# Usage: ./scripts/security-scan.sh [--quick]
|
|
7
|
+
# --quick skip semgrep + osv (only gitleaks)
|
|
8
|
+
|
|
9
|
+
set -uo pipefail
|
|
10
|
+
cd "$(git rev-parse --show-toplevel)"
|
|
11
|
+
|
|
12
|
+
QUICK=0
|
|
13
|
+
[[ "${1:-}" == "--quick" ]] && QUICK=1
|
|
14
|
+
|
|
15
|
+
FINDINGS=0
|
|
16
|
+
|
|
17
|
+
echo "── gitleaks (working tree, no-git) ──"
|
|
18
|
+
if command -v gitleaks >/dev/null; then
|
|
19
|
+
if ! gitleaks detect --source . --config .gitleaks.toml --no-banner --no-git; then
|
|
20
|
+
FINDINGS=$((FINDINGS + 1))
|
|
21
|
+
fi
|
|
22
|
+
else
|
|
23
|
+
echo " gitleaks not installed — see SECURITY-PIPELINE.md for install"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$QUICK" = "0" ]; then
|
|
27
|
+
echo
|
|
28
|
+
echo "── semgrep (full repo) ──"
|
|
29
|
+
if command -v semgrep >/dev/null; then
|
|
30
|
+
if ! semgrep --config=p/default --config=p/security-audit --config=p/secrets \
|
|
31
|
+
--config=p/python --config=p/dockerfile --config=p/github-actions \
|
|
32
|
+
--error --skip-unknown-extensions --quiet 2>&1; then
|
|
33
|
+
FINDINGS=$((FINDINGS + 1))
|
|
34
|
+
fi
|
|
35
|
+
else
|
|
36
|
+
echo " semgrep not installed"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo
|
|
40
|
+
echo "── osv-scanner ──"
|
|
41
|
+
if command -v osv-scanner >/dev/null; then
|
|
42
|
+
if ! osv-scanner --recursive --skip-git ./ ; then
|
|
43
|
+
FINDINGS=$((FINDINGS + 1))
|
|
44
|
+
fi
|
|
45
|
+
else
|
|
46
|
+
echo " osv-scanner not installed"
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo
|
|
51
|
+
if [ "$FINDINGS" -eq 0 ]; then
|
|
52
|
+
echo "✅ Clean — no findings."
|
|
53
|
+
else
|
|
54
|
+
echo "⚠️ $FINDINGS scanner(s) reported findings — triage above."
|
|
55
|
+
echo " Pre-push gate only blocks NEW findings vs origin/main; pre-existing debt is tracked separately."
|
|
56
|
+
fi
|
|
57
|
+
exit 0
|