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

Adds documentation for Go callgraph generation #244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion internal/callgraph/language/golang/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# TODO: add docs to this readme on how we generate go CGs
# Go CallGraph Generation

Building callgraphs for Go is generally easy, but there are some caveats.
If your project depends on building non-Go components then you need to manually build the project before building the callgraph.
Once the project is built you can generate the callgraph with the following command:
```shell
debricked callgraph .
```

And then upload it and scan it using:


```shell
debricked scan .
```

# Additional Information

The callgraph generation depends only on internal functionality in the Go standard library, for more information about this and the implementation see:
https://cs.opensource.google/go/x/tools/+/refs/tags/v0.19.0:cmd/callgraph/main.go

As always, callgraph cannot be expected to include all possible calls in your program and not all included calls are guaranteed to be reachable.
Loading