Skip to content

Conversation

@cdrubin
Copy link
Collaborator

@cdrubin cdrubin commented Nov 20, 2025

This is a github workflow change that impacts the semgrep workflow.
Until now the semgrep scan has been using semgrep ci which uses managed rules and is done when manually triggered and on a cron schedule. This PR intends to allow the execution of custom rules located in the .semgrep directory when pull requests are made through the use of semgrep scan
includes:

  • an example rule .semgrep/dates-in-docs.yaml that marks matches of the pattern [Cc]oming [Ss]oon and for digit numbers as a stand-in for year in dates as an error but does not return an error code to the workflow which should avoid impacting any users even if there are issues.
  • a locally runnable script tools/semgrep-repo-rulesthat executes the same rule matching by semgrep locally

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/pcx-content-engineering, @kodster28
* @cloudflare/pcx-technical-writing

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

@cdrubin cdrubin changed the title Try out an example custom semgrep stored in repo for scanning against pull requests Example custom semgrep rule for detecting fixed time references that is stored in repo for scanning against pull requests Nov 24, 2025
@cdrubin cdrubin merged commit 1e146bf into production Nov 24, 2025
9 of 10 checks passed
@cdrubin cdrubin deleted the cefan/custom_semgrep_rules branch November 24, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants