Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: allow single pattern field to match composite literals #5498

Merged
merged 1 commit into from
Jun 12, 2022

Conversation

aryx
Copy link
Collaborator

@aryx aryx commented Jun 12, 2022

This closes #5452

test plan:
test file included

PR checklist:

  • Documentation is up-to-date
  • Changelog is up-to-date
  • Change has no security implications (otherwise, ping security team)

This closes #5452

test plan:
test file included
@linear
Copy link

linear bot commented Jun 12, 2022

PA-1453 Go: Unable to match specific members within a struct initialization when using `pattern-inside`

Describe the bug
I'm having trouble matching specific MemberName: Value pairs when using a pattern-inside along with a pattern to match specific members of a struct.

To Reproduce
https://semgrep.dev/s/68B1

Expected behavior
The InsecureSkipVerify: true should match

What is the priority of the bug to you?

  • P0: blocking your adoption of Semgrep or workflow
  • P1: important to fix or quite annoying
  • P2: regular bug that should get fixed

Use case
Allow me to write more detailed Go rules
From #5452
Originally opened by enncoded

@aryx aryx requested a review from a team June 12, 2022 13:42
@aryx aryx merged commit 698e29d into develop Jun 12, 2022
@aryx aryx deleted the pad/pa-1453-go-unable-to-match-specific-members branch June 12, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Go: Unable to match specific members within a struct initialization when using pattern-inside
1 participant