Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test Semgrep Rules

on: [push]

jobs:
validate-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Semgrep
run: |
pip install semgrep

- name: Validate Rules
run: |
bin/validate-rules
shell: bash

- name: Run Rule Tests
run: |
bin/test
shell: bash
4 changes: 4 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Run semgrep test cases for specific rules
semgrep --test --config rules/src/ rules/test/
4 changes: 4 additions & 0 deletions bin/validate-rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Validate config is valid before testing
semgrep --validate --config ./rules/src
Loading