Skip to content

Semgrep does not like null values in it's yaml files #81

Description

@intrudir

Below are the errors I get when running using the repo against the root dir like the README suggests, and having changed nothing:

(.venv) ➜  clientportal-be git:(dev) semgrep --config /opt/tools/semgrep/semgrep-rules .                            

┌──── ○○○ ────┐
│ Semgrep CLI │
└─────────────┘

semgrep error: null values prohibited
  --> /opt/tools/semgrep/semgrep-rules/.github/workflows/semgrep-rules-test.yml:3
2 | on:
3 |   pull_request:
  |                ^
4 |   push:

In semgrep YAML configuration, null values are prohibited

(.venv) ➜  clientportal-be git:(dev) semgrep --config /opt/tools/semgrep/semgrep-rules .                                                                  
                                                                                                                                                          
┌──── ○○○ ────┐                                                                                                                                           
│ Semgrep CLI │                                                                                                                                           
└─────────────┘                                                                                                                                           
                                                                                                                                                          
semgrep error: null values prohibited                                                                                                                     
  --> /opt/tools/semgrep/semgrep-rules/.github/workflows/semgrep-rules-format.yml:3                                                                       
2 | on:                                                                                                                                                   
3 |   pull_request:                                                                                                                                       
  |                ^                                                                                                                                      
4 |   push:                                                                  

If i comment out the affending lines, it appears to work but then we get a whole mess of other errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions