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

Initial structure for cpg native queries and and a small example #865

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

konradweiss
Copy link
Contributor

This PR is an initial structure to execute CPG native queries on a CPG backend to generate findings associated with CPG nodes.

An exampel to executed the ExampleQuery:

./gradlew run --args="runNativeQueries cpg --source <file>"

…y showing how crypto Annotations can be extracted and converted to sarif outputs
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 0.53763% with 185 lines in your changes missing coverage. Please review.

Project coverage is 70.30%. Comparing base (81597ae) to head (309fad9).

Files Patch % Lines
...ionLanguage/cpg/native/TSFIInformationExtractor.kt 0.00% 90 Missing ⚠️
...icationLanguage/cpg/native/CPGQuerySarifBuilder.kt 0.00% 27 Missing ⚠️
...pecificationLanguage/cpg/native/CPGQueryFinding.kt 0.00% 15 Missing ⚠️
...ecificationLanguage/cpg/native/CPGQueryExecutor.kt 0.00% 14 Missing ⚠️
...icationLanguage/cpg/native/queries/ExampleQuery.kt 0.00% 12 Missing ⚠️
...e/specificationLanguage/cpg/native/XMLFormatter.kt 0.00% 8 Missing ⚠️
...ificationLanguage/cpg/native/CPGQuerySubcommand.kt 0.00% 7 Missing ⚠️
...ecificationLanguage/cpg/native/queries/CPGQuery.kt 0.00% 4 Missing ⚠️
...cationLanguage/cpg/native/CPGQueryConfiguration.kt 0.00% 3 Missing ⚠️
...ficationLanguage/cpg/native/CPGQueryOptionGroup.kt 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #865      +/-   ##
============================================
- Coverage     77.20%   70.30%   -6.90%     
  Complexity      250      250              
============================================
  Files            59       71      +12     
  Lines          1882     2068     +186     
  Branches        265      292      +27     
============================================
+ Hits           1453     1454       +1     
- Misses          308      493     +185     
  Partials        121      121              
Flag Coverage Δ
unittests 70.30% <0.53%> (-6.90%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

1 participant