@@ -810,7 +810,7 @@ rules:
810810 env:
811811 TITLE: ${{ github.event.pull_request.title }}
812812 patterns :
813- - pattern-regex : ' run:\s*(?:[|>][-+]?)?[\s\S]*? \$\{\{\s*github\.(head_ref|event\.(issue|pull_request|discussion|review|review_comment|comment)\.(title|body|head\.ref|head\.label)|event\.head_commit\.message|event\.commits\[\d+\]\.message)\s*\}\}'
813+ - pattern-regex : ' run:\s*(?:[|>][-+]?\n(?:[ \t]+[^\n]*\n)*|[^\n]*) \$\{\{\s*github\.(head_ref|event\.(issue|pull_request|discussion|review|review_comment|comment)\.(title|body|head\.ref|head\.label)|event\.head_commit\.message|event\.commits\[\d+\]\.message)\s*\}\}'
814814 paths :
815815 include :
816816 - " **/.github/workflows/*.yml"
@@ -848,7 +848,7 @@ rules:
848848 - If checkout is needed, use merge commit: refs/pull/${{ github.event.number }}/merge
849849 - Add persist-credentials: false to limit token scope
850850 patterns :
851- - pattern-regex : ' pull_request_target[\s\S]*?uses:\s*actions/checkout@[^\n]*\n(\s+\w +:.*\n)*\s+ref:\s*\$\{\{[^\}]*pull_request\.head\.(sha|ref)\s*\}\}'
851+ - pattern-regex : ' pull_request_target[\s\S]*?uses:\s*actions/checkout@[^\n]*\n(\s+[\w-] +:.*\n)*\s+ref:\s*\$\{\{[^\}]*pull_request\.head\.(sha|ref)\s*\}\}'
852852 paths :
853853 include :
854854 - " **/.github/workflows/*.yml"
@@ -1066,8 +1066,6 @@ rules:
10661066 $VAR := os.Getenv("...")
10671067 - pattern-not : |
10681068 var $VAR = os.Getenv("...")
1069- - pattern-not : |
1070- const $VAR = os.Getenv("...")
10711069 - pattern-not : |
10721070 $VAR, $_ := os.LookupEnv("...")
10731071 metadata :
@@ -1869,7 +1867,7 @@ rules:
18691867 Remediation: Always quote variables in file operations:
18701868 rm "$FILE" # correct
18711869 rm $FILE # dangerous
1872- pattern-regex : ' (rm|cp|mv|eval|chmod|chown|kill|pkill)\s+[^|;]*(?<!["'' \\])\$[A-Za-z_][A-Za-z0-9_]*'
1870+ pattern-regex : ' (rm|cp|mv|eval|chmod|chown|kill|pkill)\s+[^|;]*(?<!["'' \\])\$(?:\{ [A-Za-z_][A-Za-z0-9_]*(?:[:\-\+\?=][^}]*)?\}|[A-Za-z_][A-Za-z0-9_]*) '
18731871 metadata :
18741872 cwe : " CWE-78"
18751873 category : " security"
0 commit comments