Skip to content

Comments

Update customize-semgrep-precommit.md#2243

Open
tembalii wants to merge 1 commit intomainfrom
tembalii-patch-1
Open

Update customize-semgrep-precommit.md#2243
tembalii wants to merge 1 commit intomainfrom
tembalii-patch-1

Conversation

@tembalii
Copy link
Contributor

@tembalii tembalii commented Jul 16, 2025

Thanks for improving Semgrep Docs 😀

Please ensure

  • A subject matter expert (SME) reviews the content
  • A technical writer reviews the content or PR
  • This change has no security implications or else you have pinged the security team
  • Redirects are added if the PR changes page URLs
  • If you have changed any header tag links (doc/#this-kind-of-anchor), update all instances of that link

@netlify
Copy link

netlify bot commented Jul 16, 2025

Don't forget to add /docs at the end of the deploy preview site URL!

Name Link
🔨 Latest commit 1b6ac5b
🔍 Latest deploy log https://app.netlify.com/projects/semgrep-docs-prod/deploys/6877b7351310bd0008920275
😎 Deploy Preview https://deploy-preview-2243--semgrep-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@oscarhearsawho oscarhearsawho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

- id: semgrep-ci
entry: semgrep
args: ["ci", "--dry-run", "--baseline-commit", "HEAD" "2>/dev/null"]
args: ["ci", "--dry-run", "--baseline-commit", "HEAD","--quiet"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both options are mentioned here, so what's the advantage of changing which one is provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@armchairlinguist what is currently in the doc is missing a comma but when you include it in there you still get other errors (see my other comments)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good catch on the comma, but I don't think there is an issue with the redirect (see previous thread). Both are behaving correctly.

rev: 'v1.128.0'
hooks:
- id: semgrep-verbose
- id: semgrep-ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. semgrep-ci is a named hook that already exists, and this isn't it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image @armchairlinguist when you run what is currently in the doc, you get the error in the screenshot. It does not complain about that error when you change it from semgrep-verbose to either semgrep or semgrep-ci. However a different error pops up . see below image

it only works when I change to --quiet see below
image

or when you run the pre-commit with 2>/dev/null - see below

image

Hence why I am making the updates

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no errors in this last run. What is the issue you're talking about? The hook "failed" because there are blocking findings.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first issue you shared is similar to one that Jon brought up. I still don't entirely understand what's causing that; I don't have that issue in my test repo. Let's discuss it in the internal thread so we don't clutter this one too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants