source.application so policies can target a surface without separate collectors.
Setup
- In TrustGuard, create a Claude Enterprise collector (Catalog → IDE & coding agents).
- Mint a
tgk_…API key on the collector Auth tab. - In the Anthropic admin console (Data and Privacy → Inference hooks), set:
- Hook URL:
{TRUSTGUARD_URL}/v1/evaluate/claude - Authorization:
Bearer <collector API key>(thetgk_…key — nottgcol_…)
- Hook URL:
- Save the endpoint in Anthropic first — that generates the
whsec_…signing secret. - Paste
whsec_…into the collector Connection tab in TrustGuard. - Reopen Edit in Anthropic and run Test connection (after the secret is installed).
- Assign a default policy before enforcing in production.
Evaluate path
POST /v1/evaluate path. The
Claude dialect returns only allow or deny. Failures degrade to allow so a
TrustGuard outage does not block the org’s Claude usage.
Surfaces
TrustGuard copies the frame’s
source.application into the gate attribute map
on every delivery. Unknown values are accepted as-is (open string).
Policy gates per surface
Keep one collector and one default policy. Differentiate with a gate onsource.application (Policies → Gates → attribute Source application):
Gates run before detectors. In Report policy mode, Block is recorded
only. Test the condition on the policy Test tab with
source.application = claude-code (or the surface you care about).
Also available on the same hook deliveries: collector.type =
anthropic_inference_hook, model.provider = anthropic, consumer.id from
the actor email/id.