- Go 76.3%
- Shell 18.3%
- Dockerfile 2.7%
- Makefile 2.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| internal | ||
| testlab | ||
| .dockerignore | ||
| .gitignore | ||
| .version | ||
| CLAUDE.md | ||
| default.pgo | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| README.md | ||
shellgraph (collector)
The ShellGraph collector. It scans one VLAN with SSH, finds the services and their connections on each host, and sends one report to shellgraph-server. It installs nothing on the target hosts.
Quick start
make build-local
./bin/shellgraph login --server https://shellgraph.example.net --token <token>
./bin/shellgraph scan
macOS
macOS puts a quarantine attribute on a binary that you download. Then macOS blocks the first run. Remove the attribute before you run the collector:
xattr -d com.apple.quarantine shellgraph-darwin-arm64
On an Intel Mac, use shellgraph-darwin-amd64. A binary that you build with make build-local does not have this attribute.
Scan finds too few hosts
The collector connects to 32 addresses at the same time. A firewall or an IPS can see this as a port scan and drop the packets. Then most addresses get the status no_ssh, and the server removes those hosts from the VLAN.
Addresses with no_ssh have no line in the output. Read the Done: line. If a large VLAN shows too few hosts, run the scan again with a lower concurrency and --dry-run:
./bin/shellgraph scan --env Production --vlan app-10 --concurrency 4 --dry-run > /dev/null
If the number of hosts increases, use the lower concurrency for this VLAN. See "Scan a large VLAN" in content/docs/collector/how-to/run-scan.md in the site repository.
Development
make test: Go tests.make build: binaries for Linux and macOS, amd64 and arm64.make image: container imageshellgraph:<version>(FROM scratch).make docker: push it togit.rda.run/shellgraph/collector.testlab/lab.sh e2e: end-to-end test with Podman (seetestlab/README.md).make help: all targets.
Documentation: the site repository, section /docs/collector/ (content/docs/collector/).