Skip to content

docs: harden Velociraptor-to-BigQuery tutorial#304

Merged
maximelb merged 2 commits into
masterfrom
velociraptor-bigquery-tutorial-improvements
Jul 15, 2026
Merged

docs: harden Velociraptor-to-BigQuery tutorial#304
maximelb merged 2 commits into
masterfrom
velociraptor-bigquery-tutorial-improvements

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

Summary

Improvements to the Velociraptor-to-BigQuery tutorial based on real-world setup friction:

  • New Prerequisites section: the project must have billing enabled — BigQuery streaming inserts are not available in the free tier (sandbox), and the tutorial now quotes the exact 403 error seen otherwise. Also notes the iam.disableServiceAccountKeyCreation org policy that can block service account key creation.
  • IAM guidance: the tutorial previously never said which role the service account needs. It now specifies BigQuery Data Editor (streaming inserts need bigquery.tables.get + bigquery.tables.updateData) and calls out that Data Viewer + Job User are not sufficient, with the exact permission-denied error.
  • Project field: clarified it expects the GCP project ID, not the display name.
  • New "Including the Hostname" section: the velociraptor_collection event only identifies the endpoint by sid (and routing belongs to the extension's webhook adapter, not the endpoint). Documents how to get the hostname by adding the built-in Generic.Client.Info artifact to collections, with both a Custom Transform example (dedicated hostname column) and a query-time JSON_VALUE example.
  • Fixed step numbering and a couple of typos.

Validation

  • markdownlint-cli2 passes on the edited file.
  • scripts/check-list-numbering.py warnings on this page pre-exist on master (verified by running against a clean tree); no new breaks introduced.
  • Transform path verified against the ext-velociraptor result-nesting logic (artifact/source names are URL-unescaped, dots replaced with underscores, split on /), and the BigQuery output config fields verified against the output implementation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CRE5GLZAwpR8zXssiEW6Bd

- Add prerequisites: billing-enabled project (streaming inserts are not
  available in the BigQuery free tier) and org policies that can block
  service account key creation
- Document the required IAM role (BigQuery Data Editor) and the exact
  permission errors seen when it is missing
- Clarify the Project field expects the GCP project ID, not display name
- Add a section on including the endpoint hostname via the built-in
  Generic.Client.Info artifact, with schema/transform and SQL examples

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRE5GLZAwpR8zXssiEW6Bd
lcbill
lcbill previously approved these changes Jul 15, 2026
The BigQuery output module has no 'schema' config field — the effective
schema is read from the BigQuery table itself, and streamed rows must
match the table's columns. Replace the stale output-form 'schema' step
with a note on matching the table columns to the Custom Transform, and
change the hostname section to ALTER TABLE instead of an output setting.
Also clarify which permission each stage of the output needs.

Verified against legion_endpoint-go storage/bigquery.go (fetchUpstreamSchema,
uploadBatch), the webapp output editor, a live run of the documented
Custom Transform through go-essentials NewTransformTemplate, the upstream
Generic.Client.Info artifact definition, and a BigQuery dry-run of the
JSON_VALUE query.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRE5GLZAwpR8zXssiEW6Bd
@maximelb maximelb merged commit 5aafb62 into master Jul 15, 2026
7 checks passed
@maximelb maximelb deleted the velociraptor-bigquery-tutorial-improvements branch July 15, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants