You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example custom semgrep rule for detecting fixed time references that is stored in repo for scanning against pull requests (#26647)
* Include custom semgrep rule stored in repo for scanning against pull requests
* disable metrics and root path to avoid warnings
* This rule must use the generic semgrep parser
* include a way to skip the local semgrep scan by including [skip semgrep] in commit message
* Require a fetch-depth of 0 to get all of the history
* Iin CI we compare committed changes made but when run locally we want to consider all changes made to the working directory (including uncommitted)
* Improved warning message for coming soon and included both committed and uncommitted changes in the local semgrep check
* Avoid fatal git error on ownership within CLI working directory
message: "Found forbidden string 'coming soon'. Too often we set expectations unfairly by attaching this phrase to a feature that may not actually arrive soon."
5
+
severity: MEDIUM
6
+
paths:
7
+
include:
8
+
- "*.htm"
9
+
- "*.html"
10
+
- "*.md"
11
+
- "*.mdx"
12
+
- "*.yaml"
13
+
- "*.yml"
14
+
exclude:
15
+
- "/src/content/changelog/**"
16
+
- "/src/content/release-notes/**"
17
+
- "/.semgrep/**"
18
+
- "/.github/**"
19
+
patterns:
20
+
- pattern-regex: "[Cc]oming [Ss]oon"
21
+
22
+
- id: potential-date
23
+
languages: [generic]
24
+
message: "Potential date found. Documentation should strive to represent universal truth, not something time-bound."
0 commit comments