Skip to content

Commit 3e6f722

Browse files
committed
Fix e2e regression tests to use correct SARIF flags and remove legacy assertions
Signed-off-by: lelia <lelia@socket.dev>
1 parent 0d95fbb commit 3e6f722

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/e2e-test.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,6 @@ jobs:
6363
python -m pip install --upgrade pip
6464
pip install .
6565
66-
- name: Verify --sarif-reachable-only without --reach exits non-zero
67-
run: |
68-
if socketcli --sarif-reachable-only --api-token dummy 2>&1; then
69-
echo "FAIL: Expected non-zero exit"
70-
exit 1
71-
else
72-
echo "PASS: Exited non-zero as expected"
73-
fi
74-
7566
- name: Run Socket CLI scan with --sarif-file
7667
env:
7768
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
@@ -164,23 +155,28 @@ jobs:
164155
--target-path tests/e2e/fixtures/simple-npm \
165156
--reach \
166157
--sarif-file /tmp/sarif-all.sarif \
158+
--sarif-scope full \
159+
--sarif-reachability all \
167160
--disable-blocking \
168-
2>/dev/null || true
161+
2>/dev/null
169162
170-
- name: Run scan with --sarif-file --sarif-reachable-only (filtered results)
163+
- name: Run scan with --sarif-file --sarif-reachability reachable (filtered results)
171164
env:
172165
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
173166
run: |
174167
socketcli \
175168
--target-path tests/e2e/fixtures/simple-npm \
176169
--reach \
177170
--sarif-file /tmp/sarif-reachable.sarif \
178-
--sarif-reachable-only \
171+
--sarif-scope full \
172+
--sarif-reachability reachable \
179173
--disable-blocking \
180-
2>/dev/null || true
174+
2>/dev/null
181175
182176
- name: Verify reachable-only results are a subset of all results
183177
run: |
178+
test -f /tmp/sarif-all.sarif
179+
test -f /tmp/sarif-reachable.sarif
184180
python3 -c "
185181
import json
186182
with open('/tmp/sarif-all.sarif') as f:

0 commit comments

Comments
 (0)