proof-of-commitment 1.30.0 → 1.31.0

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.
Files changed (2) hide show
  1. package/index.js +34 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * proof-of-commitment CLI v1.30.0
3
+ * proof-of-commitment CLI v1.31.0
4
4
  * Scores npm/PyPI/Cargo/Go packages on behavioral commitment signals.
5
5
  * Usage: npx proof-of-commitment [packages...] [options]
6
6
  */
@@ -162,6 +162,24 @@ async function handle429(res) {
162
162
  }
163
163
  console.error('');
164
164
 
165
+ // GitHub Actions: surface rate-limit as a workflow annotation so the human
166
+ // reviewer sees it in the PR checks tab, not buried in raw CI logs.
167
+ // Must fire BEFORE the path-specific branches — keyUpgrade and overshoot
168
+ // both exit early with process.exit(1) and would skip a late annotation.
169
+ if (process.env.GITHUB_ACTIONS === 'true') {
170
+ const fixUrl = keyUpgrade
171
+ ? (data.upgrade?.url || 'https://getcommit.dev/pricing?ref=ci-annotation')
172
+ : overshoot
173
+ ? (instantKeyUrl || 'https://getcommit.dev/pricing?ref=ci-annotation')
174
+ : (instantKeyUrl || 'https://getcommit.dev/get-started?ref=ci-annotation');
175
+ const fixLabel = keyUpgrade
176
+ ? 'Upgrade your API key for higher limits'
177
+ : overshoot
178
+ ? 'Get a Developer key ($15/mo, 1000/day)'
179
+ : 'Get a free API key (200/day, no card)';
180
+ console.error(`::warning title=Commit supply chain audit rate-limited::${fixLabel}. Add COMMIT_API_KEY to repo secrets. ${fixUrl}`);
181
+ }
182
+
165
183
  // Authenticated-key quota path: user already has a key, hit their daily
166
184
  // allowance. Free-key inline prompt is the wrong tool — surface upgrade.
167
185
  // (Diagnosis: 2026-06-10 idle-mode dogfood — see comment block above.)
@@ -585,6 +603,20 @@ function printTable(results, { totalScanned, totalCritical, lockfile } = {}) {
585
603
  console.log('\n' + clr(c.green, `✓ No CRITICAL packages found${suffix}.`));
586
604
  }
587
605
 
606
+ // GitHub Actions: emit annotations so CRITICAL findings surface in the PR
607
+ // checks tab and workflow summary — not buried in raw log output. This is
608
+ // the same visibility commit-action gives, but for direct CLI users.
609
+ if (process.env.GITHUB_ACTIONS === 'true') {
610
+ if (effectiveCritical > 0) {
611
+ const critNames = results.filter(r => hasCritical(r.riskFlags)).slice(0, 5).map(r => r.name).join(', ');
612
+ console.error(`::warning title=Commit: ${effectiveCritical} CRITICAL package${effectiveCritical > 1 ? 's' : ''}::Sole npm publisher + >10M downloads/week: ${critNames}. Details: getcommit.dev/audit?packages=${encodeURIComponent(critNames)}&utm_source=cli&utm_medium=ci-annotation`);
613
+ }
614
+ if (compromisedCount > 0) {
615
+ const compNames = results.filter(r => r.compromised).slice(0, 5).map(r => r.name).join(', ');
616
+ console.error(`::error title=Commit: ${compromisedCount} compromised package${compromisedCount > 1 ? 's' : ''}::Recently attacked in supply chain incidents: ${compNames}. Verify you are on clean versions.`);
617
+ }
618
+ }
619
+
588
620
  if (compromisedCount > 0) {
589
621
  console.log(clr(c.red + c.bold, `\n⚠ ${compromisedCount} package${compromisedCount > 1 ? 's' : ''} recently compromised in supply chain attacks.`));
590
622
  console.log(clr(c.dim, ' Verify you are on clean versions. See URLs above for incident details.'));
@@ -846,7 +878,7 @@ async function inlineSignup(results, opts = {}) {
846
878
 
847
879
  function printHelp() {
848
880
  console.log(`
849
- ${clr(c.bold, 'proof-of-commitment')} v1.30.0 — supply chain risk scorer
881
+ ${clr(c.bold, 'proof-of-commitment')} v1.31.0 — supply chain risk scorer
850
882
 
851
883
  ${clr(c.bold, 'Usage:')}
852
884
  npx proof-of-commitment Auto-detect manifest in current dir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proof-of-commitment",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "mcpName": "io.github.piiiico/proof-of-commitment",
5
5
  "description": "Supply chain security risk scorer for npm, PyPI, Cargo, and Go packages — behavioral signals that can't be faked",
6
6
  "type": "module",