Skip to content

Commit 8600520

Browse files
allanhaggettclaude
andcommitted
Exclude generic var-in-href semgrep rule that nosemgrep cannot suppress
The generic.html-templates.security.var-in-href.var-in-href rule flags server-generated moodle_url values in mustache templates. nosemgrep comments don't work with generic template pattern rules, so exclude the rule via --exclude-rule in the CI workflow instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4d058cf commit 8600520

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

.github/workflows/semgrep.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
--config "p/secrets" \
3333
--config "p/insecure-transport" \
3434
--config .semgrep.yml \
35+
--exclude-rule "generic.html-templates.security.var-in-href.var-in-href" \
3536
--error \
3637
--sarif \
3738
--output=semgrep-results.sarif \

templates/editor.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<div id="githubsync-editor" class="githubsync-editor">
3333
{{! Toolbar }}
3434
<div class="d-flex align-items-center mb-3">
35-
<!-- nosemgrep: generic.html-templates.security.var-in-href.var-in-href -->
3635
<a href="{{configurl}}" class="btn btn-secondary btn-sm mr-2">
3736
{{#pix}}i/return, core{{/pix}}
3837
{{#str}}editor_back, local_githubsync{{/str}}

0 commit comments

Comments
 (0)