praxis-sec 1.2.0 → 1.2.1

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 (49) hide show
  1. package/cli/agents/abom-generator.js +1 -1
  2. package/cli/agents/agent-attestation-agent.js +10 -1
  3. package/cli/agents/agent-config-scanner.js +1 -1
  4. package/cli/agents/ai-infra-inventory-agent.js +482 -482
  5. package/cli/agents/base-agent.js +1 -1
  6. package/cli/agents/endpoint-agent-abuse-agent.js +1 -1
  7. package/cli/agents/html-reporter.js +3 -3
  8. package/cli/agents/index.js +2 -2
  9. package/cli/agents/injection-tester.js +8 -1
  10. package/cli/agents/memory-poisoning-agent.js +1 -1
  11. package/cli/agents/model-file-scanner.js +1 -1
  12. package/cli/agents/orchestrator.js +11 -6
  13. package/cli/agents/prompt-injection-prober.js +228 -228
  14. package/cli/bin/praxis.js +7 -3
  15. package/cli/commands/agent-fix.js +1091 -1245
  16. package/cli/commands/audit.js +1228 -1216
  17. package/cli/commands/baseline.js +1 -1
  18. package/cli/commands/benchmark.js +1 -1
  19. package/cli/commands/ci.js +45 -21
  20. package/cli/commands/deps.js +11 -5
  21. package/cli/commands/env-audit.js +1 -1
  22. package/cli/commands/fix.js +1 -1
  23. package/cli/commands/mcp.js +1 -1
  24. package/cli/commands/red-team.js +350 -350
  25. package/cli/commands/remediate.js +1 -1
  26. package/cli/commands/rotate.js +1 -1
  27. package/cli/commands/rules.js +1 -1
  28. package/cli/commands/scan.js +554 -554
  29. package/cli/commands/score.js +1 -1
  30. package/cli/commands/undo.js +22 -77
  31. package/cli/commands/vibe-check.js +1 -1
  32. package/cli/core/fix-plan.js +274 -0
  33. package/cli/core/fs.js +27 -0
  34. package/cli/core/git-clone.js +8 -6
  35. package/cli/core/glob.js +56 -0
  36. package/cli/core/output/html-theme.js +158 -158
  37. package/cli/core/output/sarif.js +2 -2
  38. package/cli/core/web/jobs.js +2 -2
  39. package/cli/core/web/server.js +19 -8
  40. package/cli/data/threatpacks/latest.json +41 -41
  41. package/cli/integrations/github-action.js +136 -0
  42. package/cli/utils/plugin-loader.js +15 -95
  43. package/cli/utils/rule-import.js +227 -227
  44. package/cli/utils/rule-registry.js +425 -425
  45. package/cli/utils/scan-fingerprint.js +1 -1
  46. package/cli/utils/score-history.js +118 -118
  47. package/docs/USAGE.md +16 -9
  48. package/docs/design/WEB-UI.md +4 -5
  49. package/package.json +13 -4
@@ -13,7 +13,7 @@
13
13
 
14
14
  import fs from 'fs';
15
15
  import path from 'path';
16
- import fg from 'fast-glob';
16
+ import fg from '../core/glob.js';
17
17
 
18
18
  // Agent config files to discover (from AgentConfigScanner)
19
19
  const AGENT_CONFIG_FILES = [
@@ -287,11 +287,20 @@ export class AgentAttestationAgent extends BaseAgent {
287
287
  // This lane bypasses scanFileWithPatterns, so honour the documented
288
288
  // suppression comment here too — it was silently ignored before.
289
289
  const ruleTable = ruleTableLineMask(lines);
290
+ // In a package manifest every `"url"` is npm metadata — bugs, repository,
291
+ // homepage, funding — pointing at a human, never fetched at runtime, and
292
+ // npm has no `integrity` field that would pin one. Applying ASI-10 there
293
+ // reported a high on essentially every published package that declares
294
+ // `bugs.url`. The rule still applies to agent/manifest configs, which is
295
+ // where a remote resource is actually loaded.
296
+ const patterns = isPackageJson
297
+ ? PATTERNS.filter(p => p.rule !== 'AGENT_NO_INTEGRITY_HASH')
298
+ : PATTERNS;
290
299
  for (let i = 0; i < lines.length; i++) {
291
300
  const line = lines[i];
292
301
  if (ruleTable && ruleTable.has(i)) continue;
293
302
  if (this.isSuppressed(line)) continue;
294
- for (const pattern of PATTERNS) {
303
+ for (const pattern of patterns) {
295
304
  pattern.regex.lastIndex = 0;
296
305
  if (pattern.regex.test(line)) {
297
306
  findings.push(createFinding({
@@ -22,7 +22,7 @@
22
22
  import fs from 'fs';
23
23
  import path from 'path';
24
24
  import os from 'os';
25
- import fg from 'fast-glob';
25
+ import fg from '../core/glob.js';
26
26
  import { BaseAgent, createFinding } from './base-agent.js';
27
27
 
28
28
  // =============================================================================