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

First attempt to implement bug reasoning logic for Query API #765

Merged
merged 77 commits into from
Aug 19, 2022

Conversation

KuechA
Copy link
Contributor

@KuechA KuechA commented Apr 20, 2022

We probably want to simplify the identification of bugs by providing an API to query the graph for vulnerabilities.

Tasks:

  • Evaluate the different components of a query (probably something like first order logic)
  • Parse the queries
  • Add required analyses to the cpg-analysis module

See WIP wiki page concerning the Query API.

@oxisto
Copy link
Member

oxisto commented Apr 20, 2022

Just a suggestion: Wouldn't it be easier to use Kotlin itself as the script language rather than try to parse specific string-based fields and identifiers? This way we could probably re-use all the existing node types and their property and not build an additional property layer on top of it.

For example https://medium.com/adobetech/building-elegant-dsls-with-kotlin-707726c5ed21

@sonarcloud
Copy link

sonarcloud bot commented Jun 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

29.0% 29.0% Coverage
1.1% 1.1% Duplication

@oxisto oxisto added the enhancement New feature or request label Aug 12, 2022
@sonarcloud
Copy link

sonarcloud bot commented Aug 19, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

58.7% 58.7% Coverage
2.0% 2.0% Duplication

Copy link
Member

@oxisto oxisto left a comment

Choose a reason for hiding this comment

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

I propose merging an initial version of this so we can tweak it further in smaller PRs

@KuechA KuechA merged commit 5e4ae48 into main Aug 19, 2022
@KuechA KuechA deleted the console/queries branch August 19, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants