Skip to content

Commit

Permalink
[Rules] Update rule id
Browse files Browse the repository at this point in the history
- Also update comment regarding tree-sitter XML parsers
- Also drop pre-commit python language version
  • Loading branch information
ben-elttam committed Oct 25, 2024
1 parent ca9e93d commit a785b07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ repos:
rev: 0.1.1
hooks:
- id: yamlfmt
language_version: python3.10
# NOTE: If you change these settings, be sure to also
# change the semgrep.live YAML settings, otherwise diffs will fail
# to lint
Expand All @@ -44,7 +43,6 @@ repos:
rev: 0.1.1
hooks:
- id: yamlfmt
language_version: python3.10
# NOTE: If you change these settings, be sure to also
# change the semgrep.live YAML settings, otherwise diffs will fail
# to lint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rules:
- id: web-xml-url-pattern
- id: web-xml-filter-url-pattern
message: >-
web.xml Struts2
filter $FILTER_NAME
Expand All @@ -8,6 +8,7 @@ rules:
severity: INFO
# There is no proper tree-sitter-xml
# Only this https://github.com/unhammer/tree-sitter-xml
# 2023: https://github.com/tree-sitter-grammars/tree-sitter-xml
languages: [generic]
metadata:
category: security
Expand All @@ -21,8 +22,6 @@ rules:
paths:
include:
- web.xml
# unit test
- web-xml-url-pattern.xml
patterns:
- pattern: |
<filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rev: heads/master-0-g371e480
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank</display-name>

<!-- ruleid: web-xml-url-pattern -->
<!-- ruleid: web-xml-filter-url-pattern -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
Expand Down

0 comments on commit a785b07

Please sign in to comment.