mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
ci: Always install latest
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
2df968749d
commit
8b38a40a52
1 changed files with 5 additions and 18 deletions
19
.github/workflows/opengrep-scan.yml
vendored
19
.github/workflows/opengrep-scan.yml
vendored
|
|
@ -3,9 +3,7 @@
|
||||||
|
|
||||||
name: OpenGrep Full Scan
|
name: OpenGrep Full Scan
|
||||||
|
|
||||||
on:
|
on: pull_request
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
|
|
@ -19,7 +17,7 @@ jobs:
|
||||||
- name: Install OpenGrep
|
- name: Install OpenGrep
|
||||||
run: |
|
run: |
|
||||||
# Download the OpenGrep binary
|
# Download the OpenGrep binary
|
||||||
wget https://github.com/opengrep/opengrep/releases/download/v1.0.0-alpha.9/opengrep_manylinux_x86 -O opengrep
|
wget $(curl -s https://api.github.com/repos/opengrep/opengrep/releases/latest | grep "/opengrep_manylinux_x86\"" | awk '{print $2}' | sed 's|[\"\,]*||g') -O opengrep
|
||||||
|
|
||||||
# Make the binary executable
|
# Make the binary executable
|
||||||
chmod +x opengrep
|
chmod +x opengrep
|
||||||
|
|
@ -29,18 +27,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run OpenGrep with custom rules
|
- name: Run OpenGrep with custom rules
|
||||||
run: |
|
run: |
|
||||||
opengrep \
|
composer run opengrep-full -- --sarif --sarif-output findings.sarif
|
||||||
--opengrep-ignore-pattern=noopengrep \
|
|
||||||
--error \
|
|
||||||
--sarif \
|
|
||||||
--sarif-output findings.sarif \
|
|
||||||
--exclude '*.php' \
|
|
||||||
--exclude 'docs' \
|
|
||||||
--include '*.vue' \
|
|
||||||
--include '*.js' \
|
|
||||||
--include '*.ts' \
|
|
||||||
--exclude-rule 'javascript.vue.security.audit.xss.templates.avoid-v-html.avoid-v-html' \.
|
|
||||||
# If findings are detected (non-zero exit code), fail the step
|
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
if [ $exit_code -ne 0 ]; then
|
if [ $exit_code -ne 0 ]; then
|
||||||
echo "::error::OpenGrep found issues in the code. Check the report for details."
|
echo "::error::OpenGrep found issues in the code. Check the report for details."
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue