Skip to content

Add blog post Semgrep rules for generic, kotlin, and yaml #97

Add blog post Semgrep rules for generic, kotlin, and yaml

Add blog post Semgrep rules for generic, kotlin, and yaml #97

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: semgrep --validate --config .
- 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 --config="r/yaml.semgrep" --severity ERROR .