QuestionQ17

VerifiedSecuring and governing agentic workflows

Your organization requires a scanner that checks for secrets and API keys to run before Antigravity writes to any file in a repository. You added an Antigravity workspace rule instructing the agent to run the scanner first. However, you find some commits where the scanner did not run. You need to ensure the scanner runs before every file write, regardless of what the agent considers relevant.

What should you do?

Explanation

A PreToolUse hook in hooks.json runs a configured command before matching tool calls, rather than relying on the agent to follow an instruction. Configure it to run the scanner and match the file-writing tools and command-execution paths capable of writing files. (antigravity.google)

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!