acidtest 0.5.1 → 0.5.2

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.
@@ -23,11 +23,19 @@ jobs:
23
23
  steps:
24
24
  - uses: actions/checkout@v4
25
25
 
26
+ - name: Setup Node.js
27
+ if: hashFiles('src/scanner.ts') != ''
28
+ uses: actions/setup-node@v4
29
+ with:
30
+ node-version: '18'
31
+
26
32
  - name: Run AcidTest
27
33
  run: |
28
34
  # Detect if we're in acidtest repo, scan fixtures instead
29
35
  if [ -d "test-fixtures" ] && [ -f "src/scanner.ts" ]; then
30
- npx acidtest@latest scan test-fixtures/fixture-pass
36
+ npm install
37
+ npm run build
38
+ node dist/index.js scan test-fixtures/fixture-pass
31
39
  else
32
40
  npx acidtest@latest scan .
33
41
  fi
@@ -39,12 +47,20 @@ jobs:
39
47
  steps:
40
48
  - uses: actions/checkout@v4
41
49
 
50
+ - name: Setup Node.js
51
+ if: hashFiles('src/scanner.ts') != ''
52
+ uses: actions/setup-node@v4
53
+ with:
54
+ node-version: '18'
55
+
42
56
  - name: Run AcidTest
43
57
  id: acidtest
44
58
  run: |
45
59
  # Detect if we're in acidtest repo, scan fixtures instead
46
60
  if [ -d "test-fixtures" ] && [ -f "src/scanner.ts" ]; then
47
- npx acidtest@latest scan test-fixtures/fixture-pass --json > scan-results.json
61
+ npm install
62
+ npm run build
63
+ node dist/index.js scan test-fixtures/fixture-pass --json > scan-results.json
48
64
  else
49
65
  npx acidtest@latest scan . --json > scan-results.json
50
66
  fi
@@ -92,11 +108,24 @@ jobs:
92
108
  steps:
93
109
  - uses: actions/checkout@v4
94
110
 
111
+ - name: Setup Node.js
112
+ if: hashFiles('src/scanner.ts') != ''
113
+ uses: actions/setup-node@v4
114
+ with:
115
+ node-version: '18'
116
+
95
117
  - name: Run AcidTest on all skills
96
118
  run: |
97
- # Detect if we're in acidtest repo, scan fixtures instead
119
+ # Detect if we're in acidtest repo, only scan PASS fixtures
98
120
  if [ -d "test-fixtures" ] && [ -f "src/scanner.ts" ]; then
99
- npx acidtest@latest scan-all test-fixtures --json > results.json
121
+ npm install
122
+ npm run build
123
+ # Scan only PASS fixtures (fixture-fail/danger are test cases, not CI targets)
124
+ node dist/index.js scan test-fixtures/fixture-pass --json > result1.json
125
+ node dist/index.js scan test-fixtures/fixture-mcp-pass --json > result2.json
126
+ # Combine into array for testing
127
+ jq -s '.' result1.json result2.json > results.json
128
+ rm result1.json result2.json
100
129
  else
101
130
  npx acidtest@latest scan-all ./skills --json > results.json
102
131
  fi
@@ -130,12 +159,20 @@ jobs:
130
159
  steps:
131
160
  - uses: actions/checkout@v4
132
161
 
162
+ - name: Setup Node.js
163
+ if: hashFiles('src/scanner.ts') != ''
164
+ uses: actions/setup-node@v4
165
+ with:
166
+ node-version: '18'
167
+
133
168
  - name: Run AcidTest
134
169
  id: scan
135
170
  run: |
136
171
  # Detect if we're in acidtest repo, scan fixtures instead
137
172
  if [ -d "test-fixtures" ] && [ -f "src/scanner.ts" ]; then
138
- npx acidtest@latest scan test-fixtures/fixture-pass --json > scan-results.json
173
+ npm install
174
+ npm run build
175
+ node dist/index.js scan test-fixtures/fixture-pass --json > scan-results.json
139
176
  else
140
177
  npx acidtest@latest scan . --json > scan-results.json
141
178
  fi
@@ -18,33 +18,37 @@ jobs:
18
18
  - name: Checkout code
19
19
  uses: actions/checkout@v4
20
20
 
21
+ - name: Setup Node.js
22
+ if: hashFiles('src/scanner.ts') != ''
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: '18'
26
+
21
27
  - name: Run AcidTest
22
28
  run: |
23
29
  # Detect if we're scanning the acidtest repo itself
24
30
  if [ -d "test-fixtures" ] && [ -f "src/scanner.ts" ]; then
25
- echo "📦 Detected acidtest repository - scanning test fixtures"
26
- npx acidtest@latest scan-all test-fixtures --json > results.json
31
+ echo "📦 Detected acidtest repository - testing with fixtures"
32
+ npm install
33
+ npm run build
27
34
 
28
- # For scan-all, check if array is empty or has errors
29
- if [ "$(jq '. | length' results.json)" -eq 0 ]; then
30
- echo "❌ No fixtures found to scan"
31
- exit 1
32
- fi
35
+ # Only scan PASS fixtures for CI (don't fail on test cases designed to fail)
36
+ echo "🛡️ Running CI tests on PASS fixtures..."
37
+ node dist/index.js scan test-fixtures/fixture-pass --json > result-pass.json
38
+ node dist/index.js scan test-fixtures/fixture-mcp-pass --json > result-mcp.json
33
39
 
34
- # Check for any failures in the array
35
- FAILURES=$(jq '[.[] | select(.status == "FAIL" or .status == "DANGER")] | length' results.json)
40
+ PASS_STATUS=$(jq -r '.status' result-pass.json)
41
+ MCP_STATUS=$(jq -r '.status' result-mcp.json)
36
42
 
37
- echo "🛡️ AcidTest Results (Test Fixtures)"
38
- jq -r '.[] | " \(.skill.name): \(.status) (\(.score)/100)"' results.json
43
+ echo " fixture-pass: $PASS_STATUS"
44
+ echo " fixture-mcp-pass: $MCP_STATUS"
39
45
 
40
- if [ "$FAILURES" -gt 0 ]; then
41
- echo ""
42
- echo "❌ $FAILURES fixture(s) failed"
46
+ if [ "$PASS_STATUS" != "PASS" ] || [ "$MCP_STATUS" != "PASS" ]; then
47
+ echo "❌ Expected PASS fixtures to pass"
43
48
  exit 1
44
49
  fi
45
50
 
46
- echo ""
47
- echo "✅ All fixtures passed"
51
+ echo "✅ CI tests passed"
48
52
  else
49
53
  # Standard scan for skill/MCP repositories
50
54
  npx acidtest@latest scan . --json > results.json
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { reportToTerminal, reportAsJSON } from "./reporter.js";
8
8
  import { join, dirname } from "path";
9
9
  import { fileURLToPath } from "url";
10
10
  import { spawn } from "child_process";
11
- const VERSION = "0.5.1";
11
+ const VERSION = "0.5.2";
12
12
  /**
13
13
  * Main CLI function
14
14
  */
package/dist/scanner.js CHANGED
@@ -12,7 +12,7 @@ import { scanCode } from "./layers/code.js";
12
12
  import { scanCrossReference } from "./layers/crossref.js";
13
13
  import { calculateScore, determineStatus, generateRecommendation, } from "./scoring.js";
14
14
  import { detectMCPManifest, parseMCPManifest } from "./loaders/mcp-loader.js";
15
- const VERSION = "0.5.1";
15
+ const VERSION = "0.5.2";
16
16
  /**
17
17
  * Main scan function
18
18
  * Scans a skill directory or SKILL.md file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acidtest",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "description": "Security scanner for AI agent skills. Scan before you install.",
6
6
  "bin": {