Build an automated secure coding loop with CodeMender — Transcript
Full transcript
- 0:04Welcome back. In the previous two videos, we covered CodeMender's primitives
- 0:08and set up some skills and a PreToolUse hook to make our code as clean
- 0:12and secure as possible before it gets pushed to the repo.
- 0:16In this final video, we'll see everything in action during a live development
- 0:20loop. We'll show you how the agent plans, writes,
- 0:22and tests code,
- 0:24then uses our hook with CodeMender to find issues,
- 0:27automate fixes, and in rare cases, escalate to verification.
- 0:31Let's look at the full loop in action.
- 0:33We give a spec to the agent.
- 0:34It plans a feature with a threat model, writes a test,
- 0:37then writes code to pass the test, ending in an attempt to push to our
- 0:41repo. When the agent tries to push, the PreToolUse hook starts its review.
- 0:46The hook script uses CodeMender.
- 0:48cm find detects an issue.
- 0:49Since we're prioritizing speed, we have the script run cm fix right away rather than
- 0:53waiting on a full cm verify pass.
- 0:55After making the fix, it then triggers the local test suite to confirm
- 0:59that the automated patch resolves the issue without introducing any functional
- 1:03problems. Let's have our agent start writing and attempting to push code.
- 1:08First, our agent creates a threat model and writes tests.
- 1:11Then, it writes code that passes those tests.
- 1:13And then finally, it runs a check with the hook before it's able to push.
- 1:18Notice that CodeMender is actively scanning our code,
- 1:20and since we were using security skills at each stage,
- 1:23the code our agent is writing is passing CodeMender's tests.
- 1:27This is what we aim to see each time, and as developers,
- 1:30we don't need to manually run CodeMender at all.
- 1:33Now, let's create a tricky scenario where for some reason,
- 1:36our agent's skills weren't good enough, and a problem crept in.
- 1:39CodeMender finds it, and while it's able to fix the first issue,
- 1:42the second issue seems to cause a loop or is breaking something.
- 1:46If a fix fails the unit tests or CM can't fix it entirely,
- 1:49the system escalates. It runs cm verify in an isolated sandbox.
- 1:54This evaluates if the path is actually reachable.
- 1:57If the path is unverifiable, it appends a note to the commit and lets
- 2:02the engineer decide. If cm verify confirms an exploit trace,
- 2:06only then is the push denied.
- 2:08This is when we pull in a person for a review.
- 2:11With skills in place, the vast majority of pushes are clean.
- 2:15Only for the remaining, tiniest amount does our agent need to do sandbox
- 2:17verification. And if there's a real, complex issue it can't fix,
- 2:22we escalate to human-in-the-loop.
- 2:24We know that sometimes you need to push a work-in-progress or get a peer's
- 2:29eyes on a branch.
- 2:30There are still ways to block a merge, so pushing code with unresolved
- 2:34findings isn't inherently bad,
- 2:36and we're limiting it here to give the agent the best shot at fixing
- 2:39it early, not as a hard blocker, unless it's an issue we really don't
- 2:43even want in our repo like hardcoded API keys.
- 2:46You can bypass the hook using the --no-verify flag.
- 2:49This makes the local hook a helpful pre-review step,
- 2:52rather than a strict bottleneck.
- 2:54Finally, this connects to a CI/CD companion like a GitHub Action.
- 2:58It scans PR diffs and creates low friction suggestions.
- 3:01It can assign issues back to us with full context without slowing down
- 3:05the delivery pipeline.
- 3:07And that wraps up our three-part series on CodeMender.
- 3:10We've gone from exploring the CLI primitives in video one to setting
- 3:13up local pre-push hooks and proactive skills in video two,
- 3:16and finally looking at an end-to-end funnel with sandbox verification
- 3:20and a CI/CD process here in video three.
- 3:23Hopefully this gives you a clear blueprint for how to build robust security
- 3:27guidance around your coding agents.
- 3:29To put these concepts into practice, be sure to head over and complete
- 3:33the lab in the description and please drop a comment below with your
- 3:36questions or share how you're automating your own agentic workflows.
About this transcript
This page contains the full transcript of Build an automated secure coding loop with CodeMender by Google Cloud Tech, generated from the public captions YouTube serves with the video. The transcript has 675 words across 67 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.