TL;DR: An experiment showed Google Gemini could help build a working RF-decoding weather station with an ESP32, moving from planning to embedded code generation and architectural guidance, while also exposing timing bugs and debugging limits, according to Semgrep research. The result is a practical reminder that AI expands what engineers can attempt, but human validation still decides whether the system works.
At a glance
What this is: This is Semgrep’s analysis of an AI-assisted hardware build that showed coding assistants can support embedded and RF-decoding work beyond web apps, but still struggle with stateful debugging and correctness.
Why it matters: It matters because security and identity teams increasingly rely on AI for code generation, integration, and decision support, so they need to distinguish plausible output from trustworthy output before it reaches production systems.
👉 Read Semgrep’s analysis of AI coding assistants beyond web development
Context
AI coding assistants are no longer limited to generating web application snippets. The deeper governance question is whether teams can safely extend them into embedded systems, integration work, and other domains where runtime behaviour, timing, and state matter as much as syntax. For security and identity programmes, that same shift applies whenever AI is used to draft code, connect systems, or propose access and control patterns.
The article’s value is not that an AI model wrote some code. It is that the experiment shows how quickly AI can reduce the research burden for unfamiliar technical domains, while also creating a false sense of correctness. That tension matters to IAM and NHI teams because AI-generated automation can look coherent even when the underlying control logic, secret handling, or device behaviour is wrong. For related agentic AI risks, see the OWASP Agentic AI Top 10 and OWASP NHI Top 10.
Key questions
Q: How should security teams govern AI coding assistants that can execute commands?
A: Treat them as delegated non-human identities with bounded execution authority. Require human approval for destructive commands, keep command scopes narrow, and log every tool action. The key control question is not whether the assistant is helpful, but whether it can be prevented from acting outside intended scope when prompts, context, or rules are manipulated.
Q: Why do AI-generated systems still need human review even when the code looks correct?
A: Because syntactic correctness and semantic correctness are not the same thing. AI can produce code that compiles or even runs while still implementing the wrong control logic, state handling, or trust boundary. Human review is needed to catch errors that only appear when the system is exercised under real conditions, especially in safety- or security-critical workflows.
Q: What do teams get wrong about using AI for unfamiliar technical domains?
A: They often assume the model only helps with boilerplate, when the bigger risk is accepting its architectural suggestions without enough scrutiny. In unfamiliar domains, AI can compress research time and make experimentation easier, but it can also mask misunderstanding. Teams need checkpoints that verify assumptions before those assumptions become production decisions.
A: Measure whether AI output survives independent validation, not whether it arrives faster. Good signals include fewer failed test cycles, fewer runtime corrections, and fewer post-review rewrites caused by incorrect assumptions. If teams are moving faster but spending more time correcting logic, the tool is amplifying error rather than reducing it.
Technical breakdown
Why AI coding assistants struggle with embedded timing and state
Embedded systems are not just smaller software projects. They depend on timing windows, electrical signal quality, packet parsing, and device-specific side effects, which means code has to behave correctly under real physical conditions. Large language models are good at pattern synthesis and plausible implementation, but they do not intrinsically model runtime state or hardware variability. That is why a decode loop can look correct while still failing on the bench. In practice, the model needs human-observed logs and iterative correction to converge.
Practical implication: treat AI-generated embedded code as a draft that must be validated against live runtime behaviour, not accepted on syntax alone.
How AI shifts from code generation to architecture selection
The more conceptual the task, the more useful AI often becomes. In this example, the model helped compare integration options and recommended a more mature path for the target device and workflow. That reflects a broader pattern: LLMs can be useful in evaluating trade-offs, choosing implementation paths, and shaping boundaries between components. For practitioners, this is where AI starts to influence security decisions too, because architecture choices determine authentication flow, secret handling, and how much trust is concentrated in each integration point.
Practical implication: use AI for option generation and trade-off analysis, but require human approval for architecture decisions that affect identity, access, or trust boundaries.
Why plausible output is not the same as correct output
The central lesson is that AI can produce code that compiles, runs, or appears coherent while still being semantically wrong. That gap matters in application security because insecure code is often syntactically valid. It also matters for identity systems, where a flawed access check, token flow, or secret-handling routine can pass superficial review and still create exposure. The article’s own conclusion is consistent with this: the human remains the arbiter of correctness, especially when system behaviour is only visible through runtime evidence.
Practical implication: require testing, log review, and explicit correctness checks before AI-generated changes touch production or privileged workflows.
NHI Mgmt Group analysis
AI coding assistance is becoming a systems-design tool, not just a text generator. The article shows that model value increases when the task crosses into architecture, integration, and multi-step reasoning. That matters for security because many real-world failures are introduced in those translation layers, not in obvious syntax mistakes. The practitioner takeaway is to govern AI as part of the design process, not just the drafting process.
Embedded and hardware-adjacent workflows expose the limits of superficial correctness. In software security, a plausible implementation can still encode the wrong control logic, the wrong trust boundary, or the wrong state transition. This creates a governance problem for identity and access teams when AI is used to draft authentication flows, secret handling, or integration logic. The practitioner conclusion is that runtime validation must sit beside code review.
Contextual reasoning debt: AI can accelerate exploration while still leaving humans to pay for the hard parts of verification. That is the defining limitation in security-sensitive engineering because the cost of being wrong is not just a failed prototype, but an exposed system or an uncontrolled access path. Teams should treat this as a control design problem, not a productivity problem.
AI-assisted engineering expands the attack surface of trust. When teams rely on generated code, they inherit the model’s assumptions about protocols, interfaces, and data handling. In identity-heavy environments, those assumptions can affect token flows, secret storage, and privilege boundaries. The practitioner conclusion is that governance must move upstream into prompt review, test design, and release approval.
What this signals
AI-assisted development is moving into areas where runtime state, physical behaviour, and control boundaries matter. That means teams need stronger verification habits, especially when generated code can affect authentication, secrets, or privileged integrations. The relevant governance shift is simple: speed is useful only when correctness is independently demonstrated.
Contextual reasoning debt: the more an organisation depends on AI to bridge unfamiliar domains, the more verification work it pushes onto humans. For identity and access teams, that means prompt output, generated code, and integration proposals all need review paths that are closer to control assurance than to ordinary developer convenience. See the NIST AI Risk Management Framework for a governance lens on managing that risk.
For practitioners
- Validate AI-generated code against live behaviour Run generated embedded or integration code through hardware-in-the-loop tests, log-driven debugging, and boundary-condition checks before it is considered usable. Focus on timing, state transitions, and error handling, because those are the conditions where plausible output fails first.
- Separate architecture support from control approval Let AI propose options for frameworks, protocols, or device integration paths, but require a human decision for anything that changes authentication, secret storage, privilege boundaries, or trust assumptions. Treat the model as an assistant to design, not an approver of control choices.
- Review AI-generated code as a security artefact Apply the same scrutiny to generated code that you would to third-party code or low-trust contributions. Check for hidden dependencies, permissive defaults, hardcoded secrets, and implicit assumptions about runtime environment or access scope.
- Build verification into the developer workflow Require explicit tests, expected-output assertions, and failure-mode logging for every AI-assisted prototype that touches sensitive systems. If the code manages identities, tokens, or device access, include approval gates before deployment.
Key takeaways
- AI coding assistants can already help with embedded and hardware-adjacent work, but the output still needs validation under real conditions.
- The main risk is not that AI cannot generate code, but that it can generate plausible code that encodes the wrong control logic or trust assumptions.
- Security and identity teams should govern AI as part of design and verification, not just as a productivity tool for drafting code.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the technical controls, while ISO/IEC 27001:2022 define the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | MAP | The article is about evaluating AI-assisted engineering risk and fit for purpose. |
| NIST CSF 2.0 | PR.IP-1 | Secure development lifecycle practices apply to AI-assisted code generation and review. |
| NIST SP 800-53 Rev 5 | SA-11 | Security testing is needed before AI-generated code reaches sensitive environments. |
| ISO/IEC 27001:2022 | A.8.28 | Secure coding is relevant when AI helps produce code that may enter production. |
Use MAP to document where AI assistance is acceptable and where human verification is mandatory.
Key terms
- Contextual Reasoning Debt: The verification burden created when AI helps teams work in domains they do not fully understand. The model can accelerate exploration, but humans still need to check whether the assumptions, control choices, and runtime expectations are actually correct.
- Runtime validation: A control practice that tests how an AI system behaves while it is connected to real tools and data, rather than only reviewing configuration or design documents. It matters because agentic systems can appear safe on paper and still fail when prompted, chained, or given access to connected services.
- Trust Boundary: A trust boundary is the point where one system’s authority should stop and another system’s authority should begin. For internal automation, weak trust boundaries let monitoring, remediation, and execution share privileges that should have remained separate.
What's in the full article
Semgrep's full article covers the practical experiment details this post intentionally leaves for the source:
- The step-by-step RF weather station build using an SDR dongle, ESP32 hardware, and Home Assistant integration.
- The prompt-and-debug cycle that showed where Gemini produced workable embedded code and where it lost context.
- The architectural comparison between Zigbee on ESP32 C6 and ESPHome for custom sensor integration.
- The developer observations that explain why runtime errors, not syntax alone, determine whether AI output is trustworthy.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners connect identity controls to the broader security decisions that AI-assisted engineering can amplify.
Published by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org