Replies: 1 comment 3 replies
-
Q1: While that is possible to use the cpg-console, you will find it hard to extend it with your custom passes. Therefore the recommended approach here would be to create a separate project, ideally based on Gradle (or maven), run This will give you complete control over the
Q2: At first glance this looks good |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I came here via #1916 (comment). Based on my understanding, I nee to create a new pass for my use case.
My purpose is to use cpg library to build a cpg graph for a Django codebase.
I have two installation/usage questions
Q1: https://fraunhofer-aisec.github.io/cpg/GettingStarted/cli/ taught me to do this at the project root
./gradlew :cpg-console:installDist
and thencpg-console/build/install/cpg-console/bin/cpg-console
I assume this means that in order to study a django codebase at this stage I should type
:translate /path/to/the/djangocodebase/
yes?Q2: I looked at https://fraunhofer-aisec.github.io/cpg/CPG/impl/ and noticed the
Passes
partI guess this means that I have to write my own Pass class/file?
I searched in the code base and I noticed the list of files under
/passes
is a lot longer than the one shown in the diagramam i right to create my own and follow the instructions in https://fraunhofer-aisec.github.io/cpg/CPG/impl/passes/ ?
so the code will look something like:
am i getting close to the situation?
Beta Was this translation helpful? Give feedback.
All reactions