Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

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

Closed
wants to merge 20 commits into 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 57 commits behind head on legacy.

Files with missing lines 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              @@
##             legacy     #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:

@oxisto oxisto changed the base branch from main to legacy January 14, 2025 15:26
@oxisto oxisto closed this Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants