Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix e2e regression tests to use correct SARIF flags and remove legacy…
… assertions

Signed-off-by: lelia <lelia@socket.dev>
  • Loading branch information
lelia committed Mar 11, 2026
commit 3e6f72278aaeb059b0b924fc58e62d1c457c8010
22 changes: 9 additions & 13 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ jobs:
python -m pip install --upgrade pip
pip install .

- name: Verify --sarif-reachable-only without --reach exits non-zero
run: |
if socketcli --sarif-reachable-only --api-token dummy 2>&1; then
echo "FAIL: Expected non-zero exit"
exit 1
else
echo "PASS: Exited non-zero as expected"
fi

- name: Run Socket CLI scan with --sarif-file
env:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
Expand Down Expand Up @@ -164,23 +155,28 @@ jobs:
--target-path tests/e2e/fixtures/simple-npm \
--reach \
--sarif-file /tmp/sarif-all.sarif \
--sarif-scope full \
--sarif-reachability all \
--disable-blocking \
2>/dev/null || true
2>/dev/null

- name: Run scan with --sarif-file --sarif-reachable-only (filtered results)
- name: Run scan with --sarif-file --sarif-reachability reachable (filtered results)
env:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
run: |
socketcli \
--target-path tests/e2e/fixtures/simple-npm \
--reach \
--sarif-file /tmp/sarif-reachable.sarif \
--sarif-reachable-only \
--sarif-scope full \
--sarif-reachability reachable \
--disable-blocking \
2>/dev/null || true
2>/dev/null

- name: Verify reachable-only results are a subset of all results
run: |
test -f /tmp/sarif-all.sarif
test -f /tmp/sarif-reachable.sarif
python3 -c "
import json
with open('/tmp/sarif-all.sarif') as f:
Expand Down
Loading