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

feat: support codeql #10031

Merged
merged 16 commits into from Apr 1, 2024
Merged

feat: support codeql #10031

merged 16 commits into from Apr 1, 2024

Conversation

brandonspark
Copy link
Contributor

@brandonspark brandonspark commented Mar 29, 2024

What:

This PR introduces the QL language (used by CodeQL) to Semgrep.

Why:

It's funny.

How:

Did the generic translation, augmented by an intermediate AST to clarify things, and added some tests.

Closes SAF-947

Copy link
Contributor

📸 The pytest shapshots changed in your PR.
Please carefully review these changes and make sure they are intended:

  1. Review the changes at 8302d27

  2. Accept the new snapshots with

    git fetch origin && git cherry-pick 8302d27 && git push
    

@brandonspark brandonspark marked this pull request as ready for review March 30, 2024 23:28
Copy link
Contributor

@emjin emjin left a comment

Choose a reason for hiding this comment

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

Looks good to me, except I would rather you use unsafe_fake_tok a lot less. I didn't include a comment on each one, but I think in almost every place you could have used fake_tok_loc instead with minimal hassle. Given that this isn't the most important language to us it's ok with me if you merge this without addressing that.

languages/ql/generic/QL_to_generic.ml Outdated Show resolved Hide resolved
languages/ql/generic/QL_to_generic.ml Outdated Show resolved Hide resolved
languages/ql/generic/QL_to_generic.ml Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Apr 1, 2024

PR checklist:

  • Purpose of the code is evident to future readers
  • Tests included or PR comment includes a reproducible test plan
  • Documentation is up-to-date
  • A changelog entry was added to changelog.d for any user-facing change
  • Change has no security implications (otherwise, ping security team)

If you're unsure about any of this, please see:

@brandonspark brandonspark merged commit d3fdeff into develop Apr 1, 2024
37 of 39 checks passed
@brandonspark brandonspark deleted the brandon/add-codeql branch April 1, 2024 14:57
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.

None yet

2 participants