YouTube2Text

Configure pre-push security hooks for coding agents with CodeMender — Transcript

by Google Cloud Tech · 392 words · 39 segments · language en · Watch on YouTube

Full transcript

  1. 0:04In our first video, we introduced CodeMender's primitives like cm find,
  2. 0:08cm verify, and cm fix, and got a sense of what each one does for us.
  3. 0:13In this video, we're focusing on how to bring these into the local development
  4. 0:17loop with a coding agent.
  5. 0:19We'll show how to use agent skills and pre-push hooks to catch and fix
  6. 0:23security findings before your agent even pushes a commit.
  7. 0:27We want to catch findings while the context is fresh as our agent is
  8. 0:31writing the code.
  9. 0:32Similar to a person writing code, fixing issues early helps us limit
  10. 0:36CI/CD bottlenecks, context switching, and other complications.
  11. 0:40It's best to catch potential issues in the development life cycle as
  12. 0:44early as possible. By using pre-push hooks locally,
  13. 0:47we can address issues before the code ever leaves our machine.
  14. 0:51Inside the .agents/skills folder, we can define specific behaviors.
  15. 0:56We can include skills for threat modeling,
  16. 0:58secure coding guidelines, or test-driven development.
  17. 1:01These skills guide the coding agent during the initial generation phase.
  18. 1:06Using test-driven development helps keep our diffs small.
  19. 1:09It handles the routine validation tasks automatically.
  20. 1:12This allows CodeMender to focus its more intensive analysis on the difficult
  21. 1:16edge cases that usually require extra attention.
  22. 1:19The configuration lives in hooks.json.
  23. 1:22We use a PreToolUse hook to intercept the git push command.
  24. 1:26This triggers a local shell script that runs our CodeMender commands in the
  25. 1:28background. The hook script is designed for speed.
  26. 1:30It doesn't run cm verify immediately.
  27. 1:32cm verify can take time to spin up a sandbox and is useful when a change
  28. 1:37is very complex or for very large backlogs that need to be triaged.
  29. 1:41In the inner loop, where new issues can be addressed relatively quickly,
  30. 1:45it's more efficient to only run cm fix to save time.
  31. 1:49Then it triggers your local unit test suite to make sure the fix didn't
  32. 1:53break functionality. That's a starting setup for using skills and a hook
  33. 1:57that calls CodeMender in a test-driven agent workflow.
  34. 2:01For our next video, we'll see this in action and describe how CodeMender
  35. 2:05runs silently as part of our automated development cycle,
  36. 2:08only occasionally escalating when there's a verified problem.
  37. 2:12For more, check out the lab in the description and please ask questions
  38. 2:15in the comment section and describe other workflows you use with agents
  39. 2:17that could benefit from CodeMender.

About this transcript

This page contains the full transcript of Configure pre-push security hooks for coding agents with CodeMender by Google Cloud Tech, generated from the public captions YouTube serves with the video. The transcript has 392 words across 39 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.