-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca83dad
commit a1ae416
Showing
1 changed file
with
14 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,24 @@ | ||
name: Semgrep | ||
|
||
on: | ||
workflow_dispatch: {} | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- main | ||
- master | ||
paths: | ||
- '**/*.py' # Include Python files if your repo has Python code | ||
- '**/*.js' # Include JavaScript files if applicable | ||
- '**/*.html' # Include HTML files if applicable | ||
- '**/*.css' # Include CSS files if applicable | ||
- '.github/workflows/semgrep.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
workflow_dispatch: | ||
|
||
- .github/workflows/semgrep.yml | ||
schedule: | ||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00 | ||
- cron: 26 11 * * * | ||
name: Semgrep | ||
jobs: | ||
semgrep: | ||
name: semgrep/ci | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Semgrep Agent | ||
run: pip install --upgrade semgrep-agent | ||
|
||
- name: Fetch base branch | ||
run: git fetch origin main:main | ||
|
||
- name: Run Semgrep Agent | ||
run: semgrep-agent --config auto --baseline-ref origin/main | ||
- uses: actions/checkout@v4 | ||
- run: semgrep ci |