Skip to content

Commit eb5bea1

Browse files
Merge pull request #244 from debricked/0-go-cg-docs
Adds documentation for Go callgraph generation
2 parents 6492d81 + f270c94 commit eb5bea1

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# TODO: add docs to this readme on how we generate go CGs
1+
# Go CallGraph Generation
2+
3+
Building callgraphs for Go is generally easy, but there are some caveats.
4+
If your project depends on building non-Go components then you need to manually build the project before building the callgraph.
5+
Once the project is built you can generate the callgraph with the following command:
6+
```shell
7+
debricked callgraph .
8+
```
9+
10+
And then upload it and scan it using:
11+
12+
13+
```shell
14+
debricked scan .
15+
```
16+
17+
# Additional Information
18+
19+
The callgraph generation depends only on internal functionality in the Go standard library, for more information about this and the implementation see:
20+
https://cs.opensource.google/go/x/tools/+/refs/tags/v0.19.0:cmd/callgraph/main.go
21+
22+
As is ususal with callgraph generation, the resulting callgraph cannot be expected to include all possible calls in your program and not all included calls are guaranteed to be reachable/correct.

0 commit comments

Comments
 (0)