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 20 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.30030% with 332 lines in your changes missing coverage. Please review.

Project coverage is 65.64%. Comparing base (81597ae) to head (e79badf).
Report is 6 commits behind head on main.

Files Patch % Lines
...ionLanguage/cpg/native/TSFIInformationExtractor.kt 0.00% 233 Missing ⚠️
...icationLanguage/cpg/native/CPGQuerySarifBuilder.kt 0.00% 27 Missing ⚠️
...ecificationLanguage/cpg/native/CPGQueryExecutor.kt 0.00% 17 Missing ⚠️
...pecificationLanguage/cpg/native/CPGQueryFinding.kt 0.00% 15 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 ⚠️
...icationLanguage/cpg/native/InformationExtractor.kt 0.00% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@              Coverage Diff              @@
##               main     #865       +/-   ##
=============================================
- Coverage     77.20%   65.64%   -11.57%     
  Complexity      250      250               
=============================================
  Files            59       71       +12     
  Lines          1882     2215      +333     
  Branches        265      328       +63     
=============================================
+ Hits           1453     1454        +1     
- Misses          308      640      +332     
  Partials        121      121               
Flag Coverage Δ
unittests 65.64% <0.30%> (-11.57%) ⬇️

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.

@fwendland
Copy link
Collaborator

fwendland commented Jul 25, 2024

We discussed new directions of the native CPG query functionality in Codyze. We want to have:

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