Skip to content

rm anonymous-race-condition as it is fixed from go v1.22 #131

rm anonymous-race-condition as it is fixed from go v1.22

rm anonymous-race-condition as it is fixed from go v1.22 #131

name: semgrep-rules-test
on:
pull_request:
push:
branches:
- main
jobs:
semgrep-rules-test:
name: run semgrep rules tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: installation
run: |
python -m pip install --upgrade pip
python3 -m pip install semgrep
python3 -m pip install jsonschema pyyaml
- name: validations
run: |
config_args=$(
for dir in $(
find . -type d -maxdepth 1 -mindepth 1 -not -path '*/.*'
);
do
echo -n " --config $dir";
done
)
echo "Semgrep config arguments: $config_args"
semgrep scan --validate $config_args
- name: tests
run: semgrep --test --test-ignore-todo
- name: metadata-tests
run: |
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/c5ad4bb0f4c7ee5b8cd47276b582e8bb57bd0a4d/.github/scripts/validate-metadata.py
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/develop/metadata-schema.yaml.schm
python ./validate-metadata.py -s ./metadata-schema.yaml.schm -f .
- name: rules-tests
run: semgrep scan --config="r/yaml.semgrep" --severity ERROR .