<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Muthu Kumar M | Agentic AI & Cloud]]></title><description><![CDATA[Muthu Kumar M | Agentic AI & Cloud]]></description><link>https://muthukumarm.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 22:44:45 GMT</lastBuildDate><atom:link href="https://muthukumarm.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[SOC 2 for Engineers #1: Who Can Log In, and Can You Prove It?]]></title><description><![CDATA[A hands-on guide to MFA, joiner-mover-leaver and access reviews (CC6.1 to CC6.3): exact settings for Okta, Google Workspace, AWS, Azure, GCP, GitHub and…]]></description><link>https://muthukumarm.hashnode.dev/soc-2-for-engineers-1-who-can-log-in-and-can-you-prove-it</link><guid isPermaLink="true">https://muthukumarm.hashnode.dev/soc-2-for-engineers-1-who-can-log-in-and-can-you-prove-it</guid><category><![CDATA[soc 2]]></category><category><![CDATA[Security]]></category><category><![CDATA[compliance ]]></category><category><![CDATA[AWS]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Muthu Kumar M]]></dc:creator><pubDate>Fri, 04 Dec 2026 12:02:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/9d5809d7-aa74-4028-801d-e4611872bcb9.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>A hands-on guide to MFA, joiner-mover-leaver and access reviews (CC6.1 to CC6.3): exact settings for Okta, Google Workspace, AWS, Azure, GCP, GitHub and GitLab, a two-week rollout plan, and the evidence auditors ask for.</em></p>
<p>An auditor picks one name from your leavers list and asks: "When did this person lose access?" If answering takes three people and a Slack search, you have a finding. Access is the first thing a SOC 2 auditor tests, and where teams often collect exceptions: an admin without MFA, a contractor still in the GitHub org, a quarterly review that never happened. All of it is fixable with tooling you already pay for.</p>
<p>This is post 1 of a daily series on SOC 2 technical controls: how a tech team implements each one, and the evidence an auditor expects. Today: logical access. It is long on purpose, so use the headings as a reference. Menu paths change over time; where I give one, it was checked against the vendor's documentation in December 2026.</p>
<h2>What the three criteria mean, in plain words</h2>
<p><strong>Logical access</strong> means access through software (logins, keys, tokens), as opposed to physical access to a building. <strong>MFA</strong> (multi-factor authentication) means proving who you are with two different things, such as a password plus a hardware key.</p>
<table>
<thead>
<tr>
<th>Criterion</th>
<th>Plain meaning</th>
<th>Engineering translation</th>
</tr>
</thead>
<tbody><tr>
<td>CC6.1</td>
<td>Protect systems and data with access controls</td>
<td>One front door (SSO), MFA everywhere, no shared or long-lived credentials</td>
</tr>
<tr>
<td>CC6.2</td>
<td>Approve people before they get access, and remove it when it should end</td>
<td>Tickets for joiners, fast and complete offboarding</td>
</tr>
<tr>
<td>CC6.3</td>
<td>Give each person only what their role needs, and revisit it</td>
<td>Role-based groups, least privilege, quarterly access reviews</td>
</tr>
</tbody></table>
<p>The criteria text never says "MFA". The AICPA's points of focus (guidance under each criterion, revised in 2022 without changing the criteria) cover it indirectly: under CC6.1 they include "identifies and authenticates users" and "manages credentials for infrastructure and software" (service accounts and keys), and under CC6.6 "requires additional authentication or credentials" for access from outside your system boundary, such as remote access. Points of focus are guidance, not a checklist. In practice auditors expect MFA, and a missing MFA is a classic exception.</p>
<p><strong>What auditors actually test:</strong></p>
<ul>
<li><strong>Configuration:</strong> is MFA enforced, or only "available"? They look at the setting, not the policy.</li>
<li><strong>Populations:</strong> a full user list per system, compared with the HR list.</li>
<li><strong>Samples:</strong> joiners (was access approved before it was granted?) and leavers (removed on time, everywhere?).</li>
<li><strong>Reviews:</strong> did someone with authority review access on schedule, and did the removals actually happen?</li>
<li><strong>Your exports:</strong> they check that reports are complete and accurate, so keep the query that produced each one.</li>
</ul>
<h2>The design: one front door</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/b70916d8-cdef-4cee-8ce1-55a5fc0e5c4a.png" alt="Identity architecture: HR feeds the identity provider, which federates to AWS, Azure, GCP and GitHub or GitLab" style="display:block;margin:0 auto" />

<p><em>Figure 1. The identity provider (IdP) is the one place where people are created, authenticated and removed. Everything else trusts it.</em></p>
<p>If every platform has its own user list, you must offboard in a dozen places. Make the IdP the source of truth, enforce MFA there, and federate the rest. Every local account then needs a written reason. The steps below go platform by platform. For each one: what to click, what to set, how to check it worked.</p>
<h2>Step 1: The identity provider</h2>
<h3>Okta</h3>
<ol>
<li><strong>Require an authenticator.</strong> Admin Console &gt; Security &gt; Authenticators &gt; Enrollment tab &gt; Add a Policy. Set Assign to groups to "Everyone", set Okta Verify (and/or Passkey/FIDO2 WebAuthn) to <strong>Required</strong>, and set Grace period to <strong>None</strong> so users enrol at first sign-in. Okta will not honour a grace period for required authenticators during self-service registration.</li>
<li><strong>Require it at sign-in.</strong> Security &gt; Authentication Policies &gt; App sign-in &gt; pick the policy &gt; Rules tab &gt; Add rule. Set <em>User must authenticate with</em> = <strong>Any 2 factor types</strong>. For admins and production access, under <em>Possession factor constraints are</em> tick <strong>Phishing resistant</strong> (Okta FastPass or a passkey satisfy this). Move the rule above the catch-all rule, which otherwise still allows access with any two factor types.</li>
<li><strong>Provision to apps.</strong> Applications &gt; the app &gt; Provisioning &gt; To App &gt; Edit: enable <strong>Create Users</strong>, <strong>Update User Attributes</strong> and <strong>Deactivate Users</strong>.</li>
<li><strong>Verify.</strong> Open a private browser window and sign in as a test user: you must be forced to enrol. Pull deactivations from the System Log API: <code>GET /api/v1/logs?filter=eventType eq "user.lifecycle.deactivate"</code>.</li>
</ol>
<h3>Google Workspace (also the front door for Cloud Identity and GCP)</h3>
<ol>
<li>Admin console &gt; Security &gt; Authentication &gt; 2-step verification (you must be a super admin). Pick the organisational unit, tick <strong>Allow users to turn on 2-Step Verification</strong>, then set <em>Enforcement</em> to <strong>On</strong> (immediate) or <strong>Turn on enforcement from date</strong> (reminders first).</li>
<li>Set <strong>New user enrollment period</strong> (1 day to 6 months) so new hires can sign in with a password while they enrol. Under <em>Methods</em>, choose <strong>Any except verification codes via text, phone call</strong> for everyone, and <strong>Only security key</strong> for admins (this option accepts passkeys too).</li>
<li>Gotchas: users who rely on SMS will be locked out, so find them first (Login Audit event <code>login_verification</code>, parameter <code>idv_preregistered_phone</code>). In <em>Only security key</em> mode users cannot generate their own backup codes; an admin must issue them. Leave "Allow user to trust the device" off unless people move between devices often.</li>
<li><strong>Verify:</strong> Reporting &gt; User Reports &gt; Security shows each user's enrolment and enforcement status; Security &gt; Security center &gt; Security health flags OUs without 2SV.</li>
</ol>
<h3>Entra ID as the IdP</h3>
<p>Use the Azure section below; Conditional Access is where MFA is enforced.</p>
<h2>Step 2: AWS</h2>
<ol>
<li><strong>People sign in through IAM Identity Center</strong> (formerly AWS SSO). Console &gt; IAM Identity Center &gt; Settings &gt; Identity source tab &gt; Actions &gt; Change identity source &gt; External identity provider, then upload the SAML metadata from your IdP. Then turn on automatic provisioning (SCIM) from the same Identity source tab and paste the endpoint and token into your IdP. Gotchas from the docs: every user needs first name, last name, username and display name or they will not sync; the token is valid for one year and sync stops when it expires; once SCIM is on you can no longer edit users in the AWS console.</li>
<li><strong>MFA is enforced at your IdP, not in AWS.</strong> Identity Center's own MFA settings (Settings &gt; Authentication &gt; Multi-factor authentication) are not available with an external IdP. If you use Identity Center's built-in directory instead, set <em>Prompt users for MFA</em> to <strong>Every time they sign in (always-on)</strong>.</li>
<li><strong>Assign groups, not people.</strong> Identity Center &gt; Multi-account permissions &gt; AWS accounts &gt; tick accounts &gt; Assign users or groups &gt; choose groups &gt; choose permission sets. Check with <code>aws sso-admin list-account-assignments --instance-arn &lt;arn&gt; --account-id &lt;id&gt; --permission-set-arn &lt;arn&gt;</code>.</li>
<li><strong>Secure the root user.</strong> Management account: sign in as root, Security credentials &gt; Multi-factor authentication (MFA) &gt; Assign MFA device (hardware key; register a second one), and delete any root access keys. Member accounts: IAM console &gt; Root access management &gt; Enable, then select <strong>Root credentials management</strong> and <strong>Privileged root actions</strong>. Now delete member-account root credentials (the console action is <em>Delete root credentials</em>; the CLI is <code>aws sts assume-root</code> with the <code>IAMDeleteRootUserCredentials</code> task policy, sent to a regional endpoint). Accounts created in an organisation start with no root credentials. Check any account with:</li>
</ol>
<pre><code class="language-bash"># AccountMFAEnabled should be 1 for the management account; AccountAccessKeysPresent should be 0
aws iam get-account-summary --query 'SummaryMap.[AccountMFAEnabled,AccountAccessKeysPresent]'
</code></pre>
<ol start="5">
<li><strong>Backstop with an SCP</strong> (service control policy: an organisation-wide guardrail even account admins cannot override). Organizations console &gt; Policies &gt; Service control policies &gt; Create policy, then attach to the root or an OU. This version denies the root user's long-term credentials but still allows the short privileged sessions from step 4. The older "deny all root" policy would block them, per AWS's own docs:</li>
</ol>
<pre><code class="language-json">{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Deny",
    "Action": "*",
    "Resource": "*",
    "Condition": {
      "ArnLike": { "aws:PrincipalArn": ["arn:aws:iam::*:root"] },
      "Null": { "aws:AssumedRoot": "true" }
    }
  }]
}
</code></pre>
<p>SCPs never apply to the management account, which is why its root needs MFA. Verify in a sandbox account: root sign-in must fail on any API call, and <code>assume-root</code> must still work. 6. <strong>Find external and unused access with IAM Access Analyzer.</strong> Console &gt; IAM &gt; Access Analyzer &gt; Analyzer settings &gt; Create analyzer. Or run from the management or delegated administrator account:</p>
<pre><code class="language-bash">aws accessanalyzer create-analyzer --analyzer-name org-external-access --type ORGANIZATION
aws accessanalyzer create-analyzer --analyzer-name org-unused-access --type ORGANIZATION_UNUSED_ACCESS \
  --configuration '{"unusedAccess":{"unusedAccessAge":90}}'
</code></pre>
<p>The external analyzer is free. The unused-access analyzer is a paid feature, billed per IAM role and user analysed. 7. <strong>Leftover IAM users:</strong> AWS Config &gt; Rules &gt; Add rule, managed rules <code>root-account-mfa-enabled</code>, <code>iam-user-mfa-enabled</code>, <code>iam-user-unused-credentials-check</code>. Evidence export: <code>aws iam generate-credential-report</code>, wait, then <code>aws iam get-credential-report --query Content --output text | base64 --decode &gt; credential-report.csv</code>.</p>
<h2>Step 3: Azure (Microsoft Entra ID)</h2>
<ol>
<li><strong>Baseline MFA policy.</strong> Entra admin center &gt; Entra ID &gt; Conditional Access &gt; Policies &gt; New policy. Users: Include <strong>All users</strong>, Exclude your break-glass group. Target resources: <strong>All resources</strong>. Grant: <strong>Require authentication strength</strong> &gt; built-in <strong>Multifactor authentication</strong>. Set <em>Enable policy</em> to <strong>Report-only</strong>, create it, watch the sign-in logs (Report-only tab on each sign-in) for a few days, then switch it to <strong>On</strong>. Needs Entra ID P1. Without P1, use security defaults.</li>
<li><strong>Stricter policy for admins.</strong> Same path, scope to directory roles, grant strength <strong>Phishing-resistant MFA</strong>. First confirm admins registered passkeys or security keys.</li>
<li><strong>PIM for admin roles</strong> (needs Entra ID P2 or ID Governance). ID Governance &gt; Privileged Identity Management &gt; Microsoft Entra roles &gt; Roles &gt; pick a role &gt; Role settings &gt; Edit. Set <em>Activation maximum duration</em> (1 to 24 hours; many teams choose 4 to 8), turn on <strong>On activation, require multifactor authentication</strong>, require justification, and require approval for the most sensitive roles. Then Assignments &gt; Add assignments &gt; <strong>Eligible</strong>. Repeat under PIM &gt; Azure resources for subscription roles such as Owner.</li>
<li><strong>Microsoft's own enforcement.</strong> MFA is mandatory for Azure sign-ins, rolled out gradually: phase 1 covers the Azure portal and Entra admin center; phase 2, which began on 1 October 2025, covers Azure CLI, PowerShell, infrastructure-as-code tools, the SDK and REST create, update and delete calls (reads are exempt). Move pipelines that use a person's account to managed identities or workload identity. Treat Microsoft's setting as a safety net, not as your documented control.</li>
<li><strong>Verify and export.</strong> <code>az rest --method get --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies"</code> returns policies as JSON. For MFA registration per user: <code>GET https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails?$filter=isMfaRegistered eq false</code> should come back empty for active staff. Access reviews: ID Governance &gt; Access Reviews &gt; New access review (needs ID Governance licensing).</li>
</ol>
<h2>Step 4: GCP</h2>
<ol>
<li><strong>2-Step Verification</strong> is enforced in Cloud Identity or Workspace: use the Google Workspace steps above.</li>
<li><strong>Roles to groups.</strong> Cloud console &gt; IAM &amp; Admin &gt; IAM &gt; Grant access, set the principal to a Google Group, and choose predefined roles. Avoid Owner and Editor where a narrower role exists.</li>
<li><strong>Organisation policies</strong> (guardrails for the whole organisation). Cloud console &gt; IAM &amp; Admin &gt; Organization Policies &gt; select the constraint &gt; Manage policy. Set <strong>Disable service account key creation</strong> (<code>iam.disableServiceAccountKeyCreation</code>) to enforced, and restrict who can receive IAM roles by domain (<code>iam.allowedPolicyMemberDomains</code>). Organisations created on or after 3 May 2024 have both enforced by default, so check before you assume you need to set them. CLI:</li>
</ol>
<pre><code class="language-yaml"># policy.yaml, applied with: gcloud org-policies set-policy policy.yaml
name: organizations/ORG_ID/policies/iam.disableServiceAccountKeyCreation
spec:
  rules:
  - enforce: true
</code></pre>
<p>Changes take up to 15 minutes. Use <code>dryRunSpec</code> first if you have existing keys to find. Verify: <code>gcloud org-policies describe iam.disableServiceAccountKeyCreation --effective --organization=ORG_ID</code>. 4. <strong>Just-in-time admin access.</strong> Privileged Access Manager lets you create an <em>entitlement</em>: who may request, which roles, maximum duration, whether a justification and an approver are needed. Grants expire on their own and are logged. 5. <strong>Evidence:</strong> <code>gcloud asset search-all-iam-policies --scope=organizations/ORG_ID --query="policy:roles/owner"</code> lists who holds Owner.</p>
<h2>Step 5: GitHub</h2>
<ol>
<li><strong>Require 2FA.</strong> Organisation &gt; Settings &gt; Security &gt; Authentication security &gt; Two-factor authentication &gt; <strong>Require two-factor authentication for everyone in your organization</strong>, and tick <strong>Only allow secure two-factor methods</strong> (passkeys, security keys, authenticator apps, the GitHub mobile app; SMS is excluded). Gotchas: members without 2FA lose access but stay counted as seats; outside collaborators without it are removed, including bots and service accounts, which also need 2FA on their accounts.</li>
<li><strong>Enforce SAML SSO</strong> (GitHub Enterprise Cloud). Same page &gt; SAML single sign-on &gt; <strong>Require SAML SSO authentication for all members</strong>. Enable and test it first without enforcement. Enforcing removes members who have not signed in via the IdP and any bot without an IdP identity. Save the <strong>single sign-on recovery codes</strong> in your password manager. If the organisation uses Enterprise Managed Users, 2FA is enforced at the IdP instead.</li>
<li><strong>Verify.</strong> People &gt; filter <strong>Two-factor authentication: Disabled/Insecure</strong>, or <code>gh api "orgs/YOUR_ORG/members?filter=2fa_disabled" --paginate --jq '.[].login'</code> (owners only), which should be empty. Check <code>gh api orgs/YOUR_ORG/outside_collaborators</code> and keep owners (<code>role=admin</code>) to a named few.</li>
<li>Branch protection is a change-management control and gets its own post (#7).</li>
</ol>
<h2>Step 6: GitLab</h2>
<ol>
<li><strong>Group 2FA.</strong> Group &gt; Settings &gt; General &gt; Permissions and group features &gt; <strong>All users in this group must set up two-factor authentication</strong>, optionally set <em>Delay 2FA enforcement (hours)</em>. It applies to direct and inherited members. Email OTP does not count; it must be an app (TOTP) or WebAuthn key. Gotchas: access tokens made before enforcement keep working, and members added directly to a project inside the group are not forced.</li>
<li><strong>SSO.</strong> Top-level group &gt; Settings &gt; SAML SSO, then map fields to your IdP (Entity ID, ACS URL). Add SCIM so adding or removing a user in the IdP adds or removes them from the group. If you enforce SSO for web activity, a removed user with an active session can keep access for up to 24 hours until the IdP session ends, so factor that into your leaver SLA.</li>
<li>If SSO already enforces MFA at the IdP, GitLab's own 2FA can be redundant. Decide which is your documented control.</li>
</ol>
<h2>Break-glass accounts</h2>
<p>A break-glass (emergency access) account is an admin login you hope never to use, for when the IdP, MFA or a policy locks everyone out.</p>
<ol>
<li><strong>Create two or more</strong>, not tied to a person. Microsoft's guidance: cloud-only (<code>.onmicrosoft.com</code>) Global Administrators, not federated or synced, authenticated with a passkey (FIDO2) or certificate that differs from the method your daily admins use, and kept as permanent active assignments in PIM. In your IdP, keep two local (non-federated) super-admin accounts. In AWS, the management account root user with MFA is the last resort; many teams also keep one break-glass role.</li>
<li><strong>Store credentials physically,</strong> in separate secure locations known to a few named people. Not on anyone's phone.</li>
<li><strong>Exclude only as needed.</strong> Exclude the group from Conditional Access policies that block or restrict sign-in; report-only policies do not need it.</li>
<li><strong>Alert on every use.</strong> Entra: send sign-in logs to a Log Analytics workspace, then Monitor &gt; Alerts &gt; Create &gt; Alert rule, condition Custom log search on <code>SigninLogs | where UserId == "&lt;object ID&gt;"</code>. AWS: an EventBridge rule in us-east-1 with this pattern, targeting an SNS topic: <code>{"detail-type":["AWS Console Sign In via CloudTrail"],"detail":{"userIdentity":{"type":["Root"]}}}</code>.</li>
<li><strong>Test at least every 90 days</strong> (Microsoft's minimum), confirm the alert fired, and write a short note of who tested, when, and what happened. After any real use, hold a review and rotate the credentials.</li>
</ol>
<h2>Service accounts and API keys</h2>
<p>CC6.1's "credentials for infrastructure and software" means non-human logins need the same discipline. Keep one <strong>register</strong> (a sheet or GRC tool) with: ID, system, type (cloud service account, access key, personal access token, OAuth app, CI token), <strong>named owner and backup</strong>, purpose, permissions granted, created date, last used, rotation or expiry date, and linked ticket.</p>
<p>Where to pull the first list: AWS credential report and <code>aws iam list-roles</code>; GCP <code>gcloud iam service-accounts list</code> and <code>gcloud iam service-accounts keys list --iam-account=&lt;email&gt; --managed-by=user</code>; Entra app registrations and managed identities; GitHub organisation settings (GitHub Apps, personal access tokens, deploy keys) and GitLab group access tokens; Okta API tokens. Rules: no key without an owner, prefer short-lived credentials (workload identity or OIDC from CI) over long-lived keys, and rotate or delete what the last review marked unused. Review the register in the same quarterly review as people.</p>
<h2>Joiners, movers and leavers</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/d8b4c03b-4309-4469-81db-1d1c62911029.png" alt="Access lifecycle: joiner, mover and leaver flows, with a quarterly review underneath" style="display:block;margin:0 auto" />

<p><em>Figure 2. Each change starts in the HR system, leaves a ticket trail, and is checked again in the quarterly review.</em></p>
<p><strong>Ticket template</strong> (a Jira or similar form; every field is something an auditor may ask about):</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Joiner</th>
<th>Mover</th>
<th>Leaver</th>
</tr>
</thead>
<tbody><tr>
<td>Person, employee ID, HR record link</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Manager, role, department</td>
<td>Yes</td>
<td>Old and new</td>
<td>Yes</td>
</tr>
<tr>
<td>Effective date (start, change, last day)</td>
<td>Start date</td>
<td>Change date</td>
<td>Last day and time</td>
</tr>
<tr>
<td>Access requested, by system and group name</td>
<td>Role bundle</td>
<td>Add list and remove list</td>
<td>n/a</td>
</tr>
<tr>
<td>Approver and approval timestamp</td>
<td>Manager (plus system owner if privileged)</td>
<td>New manager</td>
<td>HR or manager notice</td>
</tr>
<tr>
<td>Granted or removed by, with timestamp, per system</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>MFA enrolled (date)</td>
<td>Required before first access</td>
<td>n/a</td>
<td>n/a</td>
</tr>
<tr>
<td>IdP disabled, sessions revoked (timestamp)</td>
<td>n/a</td>
<td>n/a</td>
<td>Yes</td>
</tr>
<tr>
<td>Local accounts, keys, tokens, shared secrets handled</td>
<td>n/a</td>
<td>If any</td>
<td>Yes, itemised</td>
</tr>
<tr>
<td>Devices returned, data ownership handed over</td>
<td>n/a</td>
<td>n/a</td>
<td>Yes</td>
</tr>
<tr>
<td>Closed by, closed at</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody></table>
<p><strong>SLA targets teams commonly choose (these are common choices, not AICPA mandates; pick numbers you can always meet):</strong></p>
<ul>
<li><strong>Joiner:</strong> access granted only after approval, ready by the start date, MFA enrolled on day one.</li>
<li><strong>Mover:</strong> old access removed within 5 business days of the effective date.</li>
<li><strong>Leaver:</strong> IdP account disabled and sessions revoked within 24 hours of the last day (immediately for involuntary exits); everything the IdP cannot reach removed within 3 business days.</li>
<li><strong>Access review removals:</strong> completed within 5 business days of the decision.</li>
</ul>
<p><strong>Automation with SCIM.</strong> SCIM (System for Cross-domain Identity Management) is the standard way an IdP creates, updates and deactivates accounts in other apps. It is what makes the leaver SLA realistic: disable once in the IdP and SCIM-connected apps follow. Know its limits. Only apps that support it follow, and some SaaS vendors sell SCIM on higher plans. Deprovisioning behaviour is decided by the IdP and the app (AWS notes this explicitly). Sync can stop silently when a token expires, so calendar the token rotations (AWS tokens last one year). Reconcile weekly: compare the IdP user list with each app's list and chase differences. Test with a dummy user before relying on it, and keep a manual list for apps outside SCIM.</p>
<h2>Quarterly access review: the runbook</h2>
<ol>
<li><strong>Day 1, freeze the scope.</strong> List in-scope systems (IdP, AWS, Azure, GCP, GitHub or GitLab, production database, key SaaS tools, the service account register).</li>
<li><strong>Day 1 to 3, export.</strong> DevOps exports users, groups and roles from each system and saves each file with its timestamp. Check completeness: the row count must match what the console shows.</li>
<li><strong>Day 3 to 5, enrich.</strong> Add HR status from the HR system, manager, last sign-in and MFA flag. Flag anyone not in HR, anyone inactive for 90 days, all privileged accounts and all service accounts.</li>
<li><strong>Day 5 to 15, review.</strong> Managers review their people; system owners review admin roles and service accounts. Nobody reviews their own access. Every line gets Keep, Remove or Change. Privileged and stale accounts need a written reason to Keep.</li>
<li><strong>Day 15 to 22, act.</strong> Raise one ticket per removal or change, complete it within the SLA, and attach proof.</li>
<li><strong>Day 22 to 30, verify and sign.</strong> Re-export and confirm each removed item is gone. The security lead signs the review and files it.</li>
</ol>
<p><strong>Sample review sheet columns:</strong> Review ID and quarter; System; Account or user ID; Full name; HR status (active, leaver, not found); Employee, contractor or service; Manager or owner; Role or entitlement; Privileged (Y/N); Last sign-in; MFA on (Y/N); Source export file and export time; Reviewer; Decision; Reason; Decision date; Ticket link; Revoked date; Verified by and date.</p>
<p><strong>Exceptions and revocations.</strong> Accounts not found in HR, contractors without an end date, shared accounts and stale access all go into an <strong>exception register</strong>: owner, reason, compensating control, approver, and an <strong>expiry date</strong> (the next review at most). Nothing is "kept" forever. For revocations, a decision is not evidence; the completed ticket and the clean re-export are. If a removal is late, record why and the new date. Auditors forgive a documented late fix far more readily than a missing one.</p>
<h2>A worked example: a 40-person SaaS team, two weeks</h2>
<p><em>Fictional.</em> The team uses Google Workspace as the IdP, plus AWS, GCP and GitHub. (No Azure, so that section is skipped.) Four people share the work: <strong>DevOps</strong> (IT and infrastructure), <strong>EM</strong> (the engineering manager), <strong>People</strong> (HR) and <strong>Sec</strong> (the security lead).</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/07c66001-f70e-416a-9420-d3203a29a628.png" alt="Two-week rollout plan with owners" style="display:block;margin:0 auto" />

<p><em>Figure 3. Ten working days, one owner per task.</em></p>
<table>
<thead>
<tr>
<th>Day</th>
<th>What happens</th>
<th>Who</th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>Kickoff. List systems. Export users from Workspace, AWS, GCP, GitHub into one sheet.</td>
<td>DevOps, Sec</td>
</tr>
<tr>
<td>2</td>
<td>People sends the current employee and contractor list. Reconcile; list orphans and leavers who still have access. Sec drafts the access policy and SLAs.</td>
<td>People, Sec</td>
</tr>
<tr>
<td>3</td>
<td>Remove orphans (with tickets). Create role groups. EM approves role-to-access mapping.</td>
<td>DevOps, EM</td>
</tr>
<tr>
<td>4</td>
<td>EM announces the MFA date. Hardware keys ordered for admins. Workspace 2SV set to "Turn on enforcement from date" (day 10) with a new-user enrolment period.</td>
<td>EM, DevOps</td>
</tr>
<tr>
<td>5</td>
<td>AWS: Identity Center connected to the IdP with SCIM, permission sets assigned to groups. Root MFA and root-key check on the management account.</td>
<td>DevOps</td>
</tr>
<tr>
<td>6</td>
<td>AWS: root-deny SCP (with the AssumedRoot condition) in a sandbox OU, Access Analyzer on, Config rules on. Break-glass accounts created.</td>
<td>DevOps, Sec</td>
</tr>
<tr>
<td>7</td>
<td>GCP: organisation policies (dry run first), roles moved from people to groups.</td>
<td>DevOps</td>
</tr>
<tr>
<td>8</td>
<td>GitHub: SAML and SCIM if on Enterprise Cloud, otherwise require 2FA. Chase <code>2fa_disabled</code>. Service account register started.</td>
<td>DevOps, EM</td>
</tr>
<tr>
<td>9</td>
<td>People adds the Jira joiner/mover/leaver forms and a termination-notice step. Leaver dry run. Break-glass test and alert test.</td>
<td>People, Sec</td>
</tr>
<tr>
<td>10</td>
<td>Enforcement day. Fix lockouts. First review sheet filled as a baseline. Evidence pack filed. Sec signs off.</td>
<td>All</td>
</tr>
</tbody></table>
<p><strong>Gotchas this team would hit:</strong> SMS-only users locked out on day 10 (check Login Audit first); contractors using personal GitHub accounts; usernames that differ between Workspace and AWS so SCIM or SAML sign-in fails; a CI job running on a former engineer's personal access token; a break-glass key kept in one person's drawer; the SCP breaking a legitimate root-only task; and screenshots with no time or system name, which you will have to redo.</p>
<h2>Evidence: what to keep</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/273c1254-7f5e-4c0b-a602-5605d6092c8b.png" alt="Evidence map for CC6.1, CC6.2 and CC6.3" style="display:block;margin:0 auto" />

<p><em>Figure 4. Each criterion maps to a short list of artefacts.</em></p>
<table>
<thead>
<tr>
<th>Evidence</th>
<th>Where to get it</th>
<th>How often</th>
<th>What the auditor samples</th>
</tr>
</thead>
<tbody><tr>
<td>MFA enforcement settings</td>
<td>IdP policy screenshot plus JSON export (Okta, Workspace, Entra Conditional Access)</td>
<td>Period start and end, plus every change</td>
<td>The setting on specific dates</td>
</tr>
<tr>
<td>User list with MFA status</td>
<td>IdP report, Entra registration report</td>
<td>Quarterly, plus period end</td>
<td>Every active user; none without MFA</td>
</tr>
<tr>
<td>Cloud root and guardrails</td>
<td>AWS <code>get-account-summary</code>, SCP JSON; GCP org policy output; Azure policy JSON</td>
<td>Quarterly and on change</td>
<td>Root MFA on, no root keys, policies attached</td>
</tr>
<tr>
<td>GitHub or GitLab org settings</td>
<td>Settings screenshots, <code>2fa_disabled</code> result</td>
<td>Quarterly</td>
<td>SSO and 2FA enforced</td>
</tr>
<tr>
<td>Joiner tickets</td>
<td>HR record, ticket, IdP creation log</td>
<td>Per event</td>
<td>New hires: approved before access</td>
</tr>
<tr>
<td>Leaver tickets</td>
<td>HR termination list, IdP deactivation log, per-system proof</td>
<td>Per event</td>
<td>Leavers: removed everywhere within the SLA</td>
</tr>
<tr>
<td>Admin and privileged lists</td>
<td>Identity Center assignments, Entra PIM, GCP IAM export, GitHub owners</td>
<td>Quarterly</td>
<td>A written reason per admin</td>
</tr>
<tr>
<td>Access review record</td>
<td>Review sheet, sign-off, revocation tickets, re-export</td>
<td>Quarterly</td>
<td>Each quarter in the period; removals done</td>
</tr>
<tr>
<td>Service account register</td>
<td>Register file plus the source exports</td>
<td>Quarterly</td>
<td>Owner and purpose for sampled accounts</td>
</tr>
</tbody></table>
<p><strong>What a good artifact looks like.</strong></p>
<ul>
<li><strong>Screenshots</strong> must show, in one frame: date and time (with time zone), the system and tenant name or URL, the full setting name and its value, and the policy status (for example "Active"). Cropped screenshots may be rejected.</li>
<li><strong>Exports</strong> should be machine-readable (CSV or JSON), generated by a command or report you can name, and carry the export time, filter used and row count (put the command in a text file beside it).</li>
<li><strong>A leaver proof</strong> is the HR termination record, the IdP deactivation log entry and one removal proof per system, tied together by the ticket.</li>
<li><strong>A review proof</strong> is the original export, the decisions, the completed revocation tickets and the post-removal re-export.</li>
</ul>
<p><strong>Naming and folders.</strong> Use <code>YYYY-MM-DD_system_control_description.ext</code>, for example <code>2026-12-04_okta_mfa-policy_app-signin-rules.json</code>. Folder by period, then control: <code>evidence/2026-Q4/CC6.1-mfa/</code>, <code>CC6.2-joiners-leavers/</code>, <code>CC6.3-access-reviews/</code>, <code>service-accounts/</code>. Keep read-only access for the auditor and an index file listing each item and its source.</p>
<p><strong>How auditors sample (common practice, not an AICPA rule; each firm sets its own method).</strong> For a Type II period of about twelve months, common samples are:</p>
<table>
<thead>
<tr>
<th>Control</th>
<th>Population</th>
<th>Common sample</th>
</tr>
</thead>
<tbody><tr>
<td>Quarterly access review</td>
<td>4</td>
<td>2</td>
</tr>
<tr>
<td>Monthly check</td>
<td>12</td>
<td>2 to 5</td>
</tr>
<tr>
<td>Weekly check</td>
<td>52</td>
<td>5 to 15</td>
</tr>
<tr>
<td>Joiners, leavers, access requests (event-driven)</td>
<td>Depends</td>
<td>Often 25 to start for large populations; if the population is small, all of them</td>
</tr>
<tr>
<td>System-enforced setting (MFA enforced in the IdP)</td>
<td>Every login</td>
<td>One test, plus proof the setting did not change in the period</td>
</tr>
</tbody></table>
<p>A 40-person company will have only a handful of leavers a year, so expect the auditor to test every one. Shorter periods change this: in a three-month period a quarterly review runs once.</p>
<p><strong>Type I vs Type II.</strong> Type I asks whether controls are <em>designed</em> properly on one date, so settings screenshots plus your policy are the core. Type II asks whether they <em>operated</em> throughout the period, so the auditor samples events from the whole window. Start keeping evidence now, even if your first report is Type I.</p>
<p><strong>Where GRC tools help (generic).</strong> Compliance automation tools can connect read-only to your IdP, cloud accounts and GitHub, pull configuration and user lists on a schedule with timestamps, flag drift (for example a user without MFA), link tickets to controls and give the auditor a read-only workspace. Check what each integration actually collects, because gaps hide in what is not connected. Keep your own native exports too, and keep testing completeness and accuracy.</p>
<h2>Common audit failures and how to avoid them</h2>
<ul>
<li><strong>MFA "available", not enforced.</strong> Turn on enforcement and export the setting.</li>
<li><strong>A leaver kept access somewhere.</strong> Use a per-system leaver checklist and compare HR leavers with each user list monthly.</li>
<li><strong>No approval before access.</strong> Make the approved ticket a required onboarding step.</li>
<li><strong>Review done, no revocations proved.</strong> Attach the revocation ticket and the clean re-export.</li>
<li><strong>Shared and service accounts with no owner.</strong> Keep the register; name an owner and purpose.</li>
<li><strong>MFA on staff, not on break-glass or service accounts.</strong> Document each exception with a compensating control.</li>
<li><strong>Admins with permanent access.</strong> Use PIM, GCP Privileged Access Manager or time-boxed grants.</li>
<li><strong>Unprovable timing.</strong> Capture timestamps in the ticket, not only in the tools.</li>
</ul>
<h2>One-page checklist</h2>
<ul>
<li><input disabled type="checkbox" /> IdP is the source of truth, fed by HR start and end dates</li>
<li><input disabled type="checkbox" /> MFA enforced for every user; phishing-resistant for admins</li>
<li><input disabled type="checkbox" /> Two break-glass accounts, alarmed on use, tested every 90 days</li>
<li><input disabled type="checkbox" /> AWS: Identity Center with groups, root MFA, no root keys, root-credentials SCP with the AssumedRoot condition, Access Analyzer on</li>
<li><input disabled type="checkbox" /> Azure: Conditional Access (report-only first), PIM eligible roles with MFA on activation</li>
<li><input disabled type="checkbox" /> GCP: 2SV enforced, roles to groups, key-creation and domain-sharing org policies checked</li>
<li><input disabled type="checkbox" /> GitHub: required secure 2FA, SSO and SCIM if available, <code>2fa_disabled</code> empty; GitLab group 2FA set</li>
<li><input disabled type="checkbox" /> Service account and API key register with named owners</li>
<li><input disabled type="checkbox" /> Joiner, mover and leaver tickets with the fields above; SLAs written and always met</li>
<li><input disabled type="checkbox" /> SCIM tokens calendared for rotation; weekly reconciliation done</li>
<li><input disabled type="checkbox" /> Quarterly access review run, signed, with re-export proof</li>
<li><input disabled type="checkbox" /> Evidence named, dated and filed by control, with how each export was produced</li>
</ul>
<p>If this was useful, please share it with your team and with the leaders who sign off on your audit. The engineers will recognise the gaps; the leaders will see why access work belongs on the roadmap. Tomorrow: encryption and key management (CC6.1 and CC6.7).</p>
<hr />
<p><em>Sources: AICPA, 2017 Trust Services Criteria (With Revised Points of Focus, 2022); AWS, Microsoft Learn, Google Cloud, Google Workspace, GitHub, GitLab and Okta documentation (full list in</em> <a href="http://notes.md"><em>notes.md</em></a><em>). General guidance, not audit advice: your auditor decides what is sufficient for your report.</em></p>
<p>#SOC2 #Compliance #CyberSecurity #InfoSec #CloudSecurity #AWS #Azure #GoogleCloud #GitHub #IAM #MFA #ZeroTrust #DevSecOps #EngineeringLeadership #GRC</p>
]]></content:encoded></item><item><title><![CDATA[CodeRabbit vs CodeAnt AI: Which AI Code Reviewer Should Guard Your Merge Button?]]></title><description><![CDATA[Most AI reviewers will comment on your next pull request. The question is which comments your engineers will trust — and what you are actually buying.]]></description><link>https://muthukumarm.hashnode.dev/coderabbit-vs-codeant-ai-which-ai-code-reviewer-should-guard-your-merge-button</link><guid isPermaLink="true">https://muthukumarm.hashnode.dev/coderabbit-vs-codeant-ai-which-ai-code-reviewer-should-guard-your-merge-button</guid><category><![CDATA[AI]]></category><category><![CDATA[Devops]]></category><category><![CDATA[code review]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Muthu Kumar M]]></dc:creator><pubDate>Thu, 03 Dec 2026 10:07:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/44aa0bc7-e59f-40e0-8c21-dace4ea1bc71.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most AI code reviewers will leave a comment on your next pull request. The harder question is whether your engineers will trust it, or learn to scroll past it. A tool that floods a change with weak comments is as useless as no tool at all. Before you buy, you need to know what it actually checks, where your code goes, and what it will cost when the whole team is on it.</p>
<p>Two names come up constantly: CodeRabbit and CodeAnt AI. I read both vendors' docs, pricing pages and policies, plus independent write-ups, all checked on 3 December 2026.</p>
<h2>The problem</h2>
<p>A human reviewer is still the last gate before production, and that gate is getting busier. More code is arriving, much of it written with AI help, and reading it carefully is slow. A tidy four-line diff can still touch a service the reviewer never opened. Secrets, vulnerable dependencies and quality gates are easy to skip at 11 p.m.</p>
<p>An AI reviewer promises a tireless second pair of eyes on the diff, the related code, and often the security and quality checks a tired human will miss. That promise only holds if the comments are good enough to act on. Before you sign, check five things: what the tool reviews besides the diff, which security and quality checks are included in the plan you will actually buy, which Git hosts and IDEs it supports, where your source is processed, and what the bill looks like when every developer who opens a pull request is a seat.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/767cf7ac-00ad-4184-b06a-04120bf81b57.png" alt="A comparison of CodeRabbit and CodeAnt AI as two different reviewers for the same pull request, one review-first and one platform-first, with the shared basics underneath." style="display:block;margin:0 auto" />

<p><em>Same pull request, two reviewers. Colours are ours, not the vendors' brand colours. Based on both vendors' documentation and pricing pages, checked 3 December 2026.</em></p>
<h2>What each one actually is</h2>
<p>CodeRabbit is review-first. It reviews in the pull request, in the CLI and in the IDE (VS Code, Cursor, Windsurf and JetBrains), writes a summary, answers questions, learns from your feedback and offers one-click fixes. Higher plans add test generation, a triage queue for open pull requests, and blast-radius and security-architecture review. A security layer covering static analysis, secrets, dependencies and infrastructure checks sits on every paid plan, on top of 59 open-source linters and scanners its docs list. It supports GitHub, GitLab, Azure DevOps and Bitbucket.</p>
<p>CodeAnt AI is platform-first. Review is one module. Security (SAST, dependency scanning, secrets, SBOM, infrastructure-as-code) and code quality (dead code, duplication, complexity, quality gates) are separate modules on the same platform, with cloud security and pentesting sold on top. It supports the same four Git hosts, including their self-managed editions, and an IDE extension for VS Code, Cursor, Windsurf, JetBrains and Visual Studio. Its own material claims 30+ languages.</p>
<p>One warning. CodeAnt's comparison page says CodeRabbit "only handles reviews". CodeRabbit's current docs list security checks. Vendor comparison pages age quickly, so I used each vendor's own docs for its own features.</p>
<table>
<thead>
<tr>
<th></th>
<th>CodeRabbit</th>
<th>CodeAnt AI</th>
</tr>
</thead>
<tbody><tr>
<td>Core focus</td>
<td>PR review, triage, explanation; security as a layer</td>
<td>Review, security and quality on one platform</td>
</tr>
<tr>
<td>Autofix</td>
<td>One-click fixes; conflict and CI fixes from Team plan</td>
<td>One-click fixes and fix PRs for vulnerabilities (10 a month on the free tier)</td>
</tr>
<tr>
<td>Security / SAST</td>
<td>Static analysis, secrets, dependency and infra checks on every paid plan; exploitability context and merge blocking on Advanced</td>
<td>SAST, SCA, secrets, SBOM, IaC as its own module; cloud security and pentests extra</td>
</tr>
<tr>
<td>Code quality</td>
<td>Review comments plus 59 linters and scanners</td>
<td>Dedicated module: dead code, duplication, complexity, quality gates</td>
</tr>
<tr>
<td>Git hosts</td>
<td>GitHub, GitLab, Azure DevOps, Bitbucket</td>
<td>Same four, including self-managed editions</td>
</tr>
<tr>
<td>IDE / CLI</td>
<td>VS Code, Cursor, Windsurf, JetBrains; CLI</td>
<td>VS Code, Cursor, Windsurf, JetBrains, Visual Studio; CLI</td>
</tr>
<tr>
<td>Languages</td>
<td>"All languages"; AI quality varies by language</td>
<td>30+ (vendor figure)</td>
</tr>
<tr>
<td>Price (annual, per developer per month)</td>
<td>Essentials $24, Team $48, Advanced $72, Enterprise custom</td>
<td>Review $24, Security $24, Quality $24, Review + Security $40, Enterprise custom</td>
</tr>
<tr>
<td>Free option</td>
<td>Public repos</td>
<td>Up to 10 developers, 50 AI reviews a month</td>
</tr>
<tr>
<td>Limits</td>
<td>5 to 12 PR reviews per developer per hour; $0.25 per extra file</td>
<td>Free tier: 50 AI reviews and 10 fix PRs a month; extra fix PRs cost $1 a credit</td>
</tr>
<tr>
<td>Data handling</td>
<td>SOC 2 Type II, GDPR; code not kept after review unless caching is on; zero retention at its AI providers</td>
<td>SOC 2 Type II, HIPAA programme; source deleted when each scan ends; no training on your code</td>
</tr>
<tr>
<td>Self-hosting</td>
<td>Enterprise only; docs state 500+ seats; bring your own LLM</td>
<td>Enterprise: on-premises, air-gapped or your own cloud</td>
</tr>
<tr>
<td>Independent signal</td>
<td>Martian benchmark, 1 Dec 2026: 60.8% F1 (as published by rival Greptile). Preprint study: 36.4% of comments accepted, 56.3% rejected</td>
<td>Martian benchmark, March 2026: 51.7% F1. No independent false-positive study found</td>
</tr>
</tbody></table>
<p><em>Prices are list prices on the vendors' own pages, 3 December 2026, billed annually. The two benchmark figures come from different dates, so read them as direction, not a score. Martian's leaderboard changes continuously.</em></p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/adfb78cc-5543-45e2-8cd5-5857f65b326e.gif" alt="A short animation of the review path: a pull request, what a diff-only review misses, an AI reviewer pipeline, where CodeRabbit and CodeAnt AI sit, and a human merge gate." style="display:block;margin:0 auto" />

<p><em>Watch the path: a pull request, what a diff-only review misses, the AI reviewer pipeline, where each tool sits, and a human merge gate.</em></p>
<h2>Where each one hurts</h2>
<p>CodeRabbit's weak spot is noise. A preprint from University of Melbourne and Monash researchers, covering 31,073 CodeRabbit comments across 239 GitHub repositories, found 36.4% were accepted and 56.3% rejected, mostly as false positives, repeats or out of scope. Its hourly review limits and per-file overage also need watching on a busy team.</p>
<p>CodeAnt AI's weak spot is proof. An independent directory, <a href="http://aicodereview.cc">aicodereview.cc</a>, notes that its performance claims are largely self-published and that one-click fixes can miss local context. The free tier is generous for a pilot, but its paid features are a menu, and the real cost depends on which modules you switch on.</p>
<p>Both vendors say they do not train on your code. For data that must not leave your walls, CodeAnt advertises a fully air-gapped deployment. CodeRabbit's self-hosted option keeps its review agent inside your network, but still sends code to the language-model provider you configure.</p>
<h2>Which one for which situation</h2>
<p>The first table gave the facts. This one turns them into choices, with a score for each tool. <strong>The ratings are my own assessment</strong> on a 5-point scale: 5 is a strong, documented fit; 3 is workable with caveats; 1 is a poor or undocumented fit. They rest on the vendors' own docs and pricing, checked 3 December 2026, plus the independent evidence above. I have not run either tool on your code, so treat them as a starting point for a pilot, not a verdict.</p>
<table>
<thead>
<tr>
<th>Your situation</th>
<th>CodeRabbit</th>
<th>CodeAnt AI</th>
<th>Why</th>
</tr>
</thead>
<tbody><tr>
<td>Cloud Git, and the pain is slow, shallow reviews</td>
<td><strong>4/5</strong></td>
<td>3/5</td>
<td>CodeRabbit reviews in PR, CLI, IDE and agent loops, with triage and explain features on higher plans. CodeAnt's review is one module, and its performance claims are mostly self-published. CodeRabbit loses a point for noise: 56.3% of comments were rejected in the preprint</td>
</tr>
<tr>
<td>Security and quality tools are already separate line items</td>
<td>3/5</td>
<td><strong>4/5</strong></td>
<td>CodeAnt packs SAST, SCA, secrets, SBOM, IaC and quality gates into modules on one platform, with review plus security at $40. CodeRabbit has a security layer and linters, but no dedicated quality module</td>
</tr>
<tr>
<td>Security checks without buying a second tool</td>
<td><strong>4/5</strong></td>
<td>3.5/5</td>
<td>CodeRabbit includes static analysis, secrets, dependency and infra checks on every paid plan, from $24. CodeAnt sells security as its own $24 module</td>
</tr>
<tr>
<td>Merge blocking on security findings</td>
<td>4/5</td>
<td>3.5/5</td>
<td>CodeRabbit lists security merge blocking on Advanced ($72), so it costs more. CodeAnt lists PR security gates on its own pages, which is vendor evidence only</td>
</tr>
<tr>
<td>Pilot on a small budget</td>
<td>2.5/5</td>
<td><strong>4/5</strong></td>
<td>CodeAnt's free plan covers up to 10 developers and 50 AI reviews a month. CodeRabbit is free only for public repositories</td>
</tr>
<tr>
<td>Self-managed Git behind a firewall</td>
<td>3.5/5</td>
<td><strong>4/5</strong></td>
<td>CodeAnt documents GitHub Enterprise Server, self-hosted GitLab, Bitbucket Data Center and Azure DevOps Server. CodeRabbit's Reverse Tunnel covers GitHub Enterprise Server, self-managed GitLab and Bitbucket Data Center</td>
</tr>
<tr>
<td>Code must not leave your network</td>
<td>2.5/5</td>
<td><strong>4/5</strong></td>
<td>CodeAnt offers on-premises, air-gapped or your-own-cloud on Enterprise. CodeRabbit's self-hosted option states 500+ seats and still sends code to the model provider you configure</td>
</tr>
<tr>
<td>Visual Studio is your main IDE</td>
<td>1/5</td>
<td><strong>4/5</strong></td>
<td>CodeAnt's docs list a Visual Studio extension. CodeRabbit's docs list VS Code, Cursor, Windsurf and JetBrains</td>
</tr>
<tr>
<td>Very mixed languages</td>
<td><strong>4/5</strong></td>
<td>3.5/5</td>
<td>CodeRabbit says all languages (quality varies) and lists 59 linters and scanners. CodeAnt claims 30+ on its own AST engine, and its own material is inconsistent between 25+ and 30+</td>
</tr>
</tbody></table>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/562035f8-1327-4987-a16a-aa31a39bdcd7.png" alt="Bar chart of the author's 1 to 5 ratings for CodeRabbit and CodeAnt AI across nine use cases." style="display:block;margin:0 auto" />

<p><em>The author's assessment, 3 December 2026, based on documented features and independent evidence, not hands-on testing.</em></p>
<p>There is no overall score, on purpose. Averaging the rows would hide the point: the right tool depends on which row is yours. Two things the ratings cannot settle. First, comment quality: the only independent numbers are a preprint on CodeRabbit and Martian benchmark snapshots from different dates. Second, cost at scale: CodeRabbit charges per developer who opens pull requests and caps included reviews per hour, with $0.25 per extra file. CodeAnt charges per module and caps AI reviews per month on its free tier. Model the bill with your real pull-request volume, not the headline price.</p>
<h2>The verdict, from a director's chair</h2>
<p>Treat the tool as a second reviewer, not the approver. Both vendors are credible, both start at $24 a developer on annual billing, and both have gaps you can measure in a pilot. The difference is philosophy: CodeRabbit goes deep on the review conversation, CodeAnt AI goes wide across review, security and quality.</p>
<h2>When to choose what</h2>
<ul>
<li><strong>Choose CodeRabbit if</strong> your pain is review speed and pull-request quality, you are on cloud Git, and you want triage, explanations and generated tests. Pay attention to its noise, and plan to teach it your rules. Expect to need the $72 Advanced plan for merge blocking on security findings.</li>
<li><strong>Choose CodeAnt AI if</strong> security and quality sit on the same budget line as review, you run self-managed Git, you use Visual Studio, or regulated data may force an on-premises or in-your-cloud deployment. Ask for evidence on comment quality, because its performance claims are mostly self-published.</li>
<li><strong>Run both, or pilot, if</strong> you cannot tell which row is yours. Use the same two repositories for two weeks. Score the share of comments your engineers act on, real defects each tool caught that the other missed, time to first review, and cost per developer at your actual pull-request volume.</li>
<li><strong>Wait if</strong> a human review queue is not your bottleneck and a linter and your existing scanners already cover the basics. A tool you do not trust is just more noise.</li>
</ul>
<p>Whatever you pick, keep a named human owner on every merge.</p>
<p>If your team is choosing an AI code reviewer this quarter, send this to your engineers and to the business leaders who will sign the contract.</p>
<p>#AICodeReview #CodeRabbit #CodeAnt #DevSecOps #DevOps #CodeReview #SoftwareEngineering #DeveloperTools #AppSec #AIAgents #GitHub #EngineeringLeadership</p>
]]></content:encoded></item><item><title><![CDATA[Bedrock Gateway Caps the Bill. Your SaaS Still Needs a Cost Ledger.]]></title><description><![CDATA[AWS just put dollar limits and smart routing in front of Bedrock models. Here is how I'd wire them into a multi-tenant Node.js stack, with Postgres doing…]]></description><link>https://muthukumarm.hashnode.dev/bedrock-gateway-caps-the-bill-your-saas-still-needs-a-cost-ledger</link><guid isPermaLink="true">https://muthukumarm.hashnode.dev/bedrock-gateway-caps-the-bill-your-saas-still-needs-a-cost-ledger</guid><category><![CDATA[AWS]]></category><category><![CDATA[Amazon Bedrock]]></category><category><![CDATA[llm]]></category><category><![CDATA[finops]]></category><category><![CDATA[TypeScript]]></category><dc:creator><![CDATA[Muthu Kumar M]]></dc:creator><pubDate>Wed, 02 Dec 2026 11:59:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/4d17d35e-2b52-4329-9cbd-5422bc799ddd.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The most expensive LLM incidents don't look like incidents. Nothing breaks. There's no runaway loop and no attacker. One tenant discovers a feature they love, an evidence-summary job that cost cents per run starts firing every hour against the biggest model you've wired in, and every single request is legitimate. The invoice is still a shock.</p>
<p>That is the problem AWS went after on 1 December at re:Invent 2026 with <strong>Amazon Bedrock Gateway</strong> and <strong>smart routing in Amazon Bedrock</strong>, both in gated preview. Both are genuinely useful. I also expect plenty of SaaS teams to switch them on, feel safe, and still get surprised, because the gateway and your product draw the budget line in different places.</p>
<h2>What actually shipped</h2>
<p>From the AWS announcement and product pages:</p>
<ul>
<li><strong>Bedrock Gateway</strong> sits in front of model calls. You connect IAM, Okta or Entra ID, and every request is tied to the user or application that sent it.</li>
<li>You set <strong>daily, weekly or monthly dollar limits per user, group or IAM role</strong>. When a limit is hit, the request stops <em>before</em> it reaches a model, and retries stay inside the budget.</li>
<li>Every response tells you how much budget is left. Every limit change lands in CloudTrail. Every request is logged to <strong>your own S3 bucket</strong> with caller, model and cost.</li>
<li>You can define <strong>fallback models</strong> for when a model is unavailable.</li>
<li><strong>Smart routing</strong> picks a model from within a model family per request, based on task complexity, cache state and your cost/quality goals. You swap a model ID for a router ID. AWS quotes 40 to 50% lower inference cost at comparable quality versus always using the most capable model in the family. Preview supports Anthropic and OpenAI models.</li>
<li>There is a <strong>shadow mode</strong>: the router runs on live traffic, shows what it <em>would</em> have picked and the projected saving, and changes nothing.</li>
</ul>
<h2>Where the line falls</h2>
<p>Gateway identities are users, groups and IAM roles. In a B2B SaaS, the thing you actually sell and price is a <strong>tenant</strong> using a <strong>feature</strong>. Those are not the same axis.</p>
<p>You are not going to mint an IAM role per tenant, and you shouldn't. So the gateway is the right place for a <em>platform-level</em> cap: "the evidence-summary feature must never spend more than X this month, whoever triggers it." It is the wrong place for <em>product-level</em> fairness: "Tenant A's plan includes Y of AI work this month, and Tenant B's heavy usage must not eat into it."</p>
<p>So I treat the two as layers:</p>
<ol>
<li><strong>App-side ledger</strong> (Postgres): per tenant, per feature, per month. Decides whether <em>this</em> tenant may spend <em>now</em>, and what to do if not.</li>
<li><strong>Bedrock Gateway</strong>: one IAM role per feature, monthly dollar cap, fallback model. The blast-radius limiter if the app logic is wrong.</li>
<li><strong>Smart router</strong>: one router ID per feature, adopted only after shadow mode proves quality holds.</li>
</ol>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/d8bdb0f2-cb91-4c30-b60c-e84a8a13126f.png" alt="" style="display:block;margin:0 auto" />

<p><em>Two budget layers: the app ledger knows tenants, the gateway knows roles. The S3 invocation log is how you keep them honest with each other.</em></p>
<h2>The ledger: reserve, then settle</h2>
<p>The pattern is the same one payment systems use: reserve before you spend, settle after. A single conditional <code>UPDATE</code> does the check and the reservation atomically, so two concurrent Lambda invocations can't both slip through the last bit of headroom.</p>
<pre><code class="language-sql">CREATE TABLE ai_budget (
  tenant_id     uuid,
  feature       text,
  period        date,             -- first day of the month
  limit_usd     numeric(12,4) NOT NULL,
  reserved_usd  numeric(12,4) NOT NULL DEFAULT 0,
  spent_usd     numeric(12,4) NOT NULL DEFAULT 0,
  PRIMARY KEY (tenant_id, feature, period)
);

-- reserve: zero rows back means "no headroom"
UPDATE ai_budget
   SET reserved_usd = reserved_usd + $4
 WHERE tenant_id = $1 AND feature = $2 AND period = $3
   AND spent_usd + reserved_usd + $4 &lt;= limit_usd
RETURNING limit_usd - spent_usd - reserved_usd AS headroom_usd;
</code></pre>
<p>The detail that matters once a router is in play: <strong>reserve at the ceiling price</strong>. You don't know which model the router will pick, so estimate input tokens, take <code>max_tokens</code> for output, and price both at the most expensive model in the router's family. Then settle at the real number from the response's usage block and give the rest back.</p>
<pre><code class="language-ts">// Illustrative. Gateway endpoint, auth and response fields are preview
// details; check the Bedrock Gateway docs for your account.
type Price = { inPerMTok: number; outPerMTok: number };

const ceilingPrice = (family: Price[]): Price =&gt; ({
  inPerMTok: Math.max(...family.map(p =&gt; p.inPerMTok)),
  outPerMTok: Math.max(...family.map(p =&gt; p.outPerMTok)),
});

export async function runAiTask(t: TaskInput) {
  const p = ceilingPrice(PRICES[t.feature]);
  const estIn = Math.ceil(t.prompt.length / 3.5);        // rough, on purpose
  const reserveUsd = (estIn * p.inPerMTok + t.maxTokens * p.outPerMTok) / 1e6;

  const ok = await ledger.reserve(t.tenantId, t.feature, reserveUsd);
  if (!ok) return degrade(t);                            // queue, or summary-only

  try {
    const res = await gatewayClient(t.feature).invoke({  // signed as the feature's IAM role
      model: ROUTER_IDS[t.feature],                      // router ID, not a model ID
      maxTokens: t.maxTokens,
      messages: t.messages,
    });
    const actual = costOf(res.usage, res.modelId);       // priced at the model actually used
    await ledger.settle(t.tenantId, t.feature, reserveUsd, actual, t.requestId);
    metrics.gauge("gateway.budget_left", res.budgetRemaining, { feature: t.feature });
    return res;
  } catch (e) {
    await ledger.release(t.tenantId, t.feature, reserveUsd);
    if (isBudgetStop(e)) await flags.throttle(t.feature); // the platform cap fired
    throw e;
  }
}
</code></pre>
<p>Two small things worth insisting on. <code>settle</code> writes a row keyed by <code>requestId</code> into an append-only usage table, so a Lambda retry can't double-charge a tenant. And <code>degrade()</code> is a product decision, not an error page: for a GRC workload, "your evidence summaries will finish overnight" is a perfectly good answer at 4 PM on the last day of the month.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/a9e379e8-b356-4133-98a8-cdba4e40bb19.png" alt="" style="display:block;margin:0 auto" />

<p><em>Two different "no" answers. The ledger's no is about fairness between tenants. The gateway's no means the app logic missed something.</em></p>
<h2>Reconcile against the gateway's own log</h2>
<p>Your ledger is an estimate of what you think you spent. The gateway's S3 log is what AWS thinks you spent. A small nightly job (a Lambda running an Athena query over the log bucket, grouped by caller role and model) compares the two per feature. Drift beyond a couple of percent usually means a code path calling the model without going through <code>runAiTask</code>, a pricing table that's out of date, or a fallback model kicking in that you priced as the primary.</p>
<p>If you carry SOC 2 or ISO 42001, this job is also free evidence: a dated record that AI usage is attributed, capped and reconciled, plus CloudTrail entries for every limit change. Auditors are starting to ask exactly how AI resources are governed.</p>
<h2>Adopt the router per feature, behind evidence</h2>
<p>Smart routing is where the headline savings are, and where I'd be most careful. A router optimising for "comparable quality" has no idea that, in a compliance product, a summary that drops one control exception is a wrong answer, not a slightly worse one.</p>
<p>Shadow mode is the right tool. The mistake would be treating projected savings as the result. Savings are only real if the cheaper model's answer would have been accepted.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/d7bd3326-ddfc-4b63-a237-713185af15ca.png" alt="" style="display:block;margin:0 auto" />

<p><em>Shadow mode tells you what the router would pick. Only your own grading tells you whether that pick would have been accepted.</em></p>
<p>What I'd do, feature by feature:</p>
<ul>
<li><strong>Start where the stakes are lowest.</strong> Ticket triage and tagging before control mapping. Control mapping before anything a customer's auditor will read.</li>
<li><strong>Grade disagreements, not agreements.</strong> Pull a sample of requests where the router chose a cheaper model, run both models offline, and grade against a golden set, with a human reviewer on anything near a pass/fail boundary.</li>
<li><strong>Measure cost per accepted result.</strong> If the cheaper model triggers more retries, more human edits or more escalations, the per-token saving disappears somewhere less visible.</li>
<li><strong>Keep high-stakes paths pinned.</strong> It is fine for one feature to stay on a fixed model ID forever. The router is an option per feature, not a platform rule.</li>
</ul>
<h2>What I'd watch while it's in preview</h2>
<p>Both features are gated preview, with no published pricing, regions or GA date yet. Keep the gateway client behind one small module, keep model and router IDs in config, and make sure the ledger still works if you point it straight back at the regular Bedrock runtime. If preview terms change, you swap one adapter instead of unpicking every feature.</p>
<p>The bigger shift is the one I like most. Spend control on AI is moving from a finance dashboard you check at month-end to a check that runs <em>before</em> the model call. The gateway now gives the platform that check. Giving the product its own version, per tenant and per feature, is still our job.</p>
<p><em>Sources: AWS What's New, "Amazon Bedrock Gateway and smart routing are now available in gated preview" (1 Dec 2026); AWS product pages for Bedrock Gateway and smart routing; About Amazon, "Amazon Bedrock adds tools to control and lower AI costs" (1 Dec 2026).</em></p>
]]></content:encoded></item><item><title><![CDATA[Your Agent's Tool Call Is the Real Attack Surface]]></title><description><![CDATA[AWS just shipped stateful guardrails for Bedrock. Here is the tool-call checkpoint pattern I'd put around them, in TypeScript.]]></description><link>https://muthukumarm.hashnode.dev/your-agent-s-tool-call-is-the-real-attack-surface</link><guid isPermaLink="true">https://muthukumarm.hashnode.dev/your-agent-s-tool-call-is-the-real-attack-surface</guid><category><![CDATA[TypeScript]]></category><category><![CDATA[AWS]]></category><category><![CDATA[Amazon Bedrock]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Muthu Kumar M]]></dc:creator><pubDate>Tue, 01 Dec 2026 14:50:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/d4bf9b99-ba65-418b-9072-40bfe93bd3cf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most prompt-injection demos end with the model saying something rude. That is not the failure that keeps me up. The failure that matters is quieter: turn four of a perfectly normal session, the agent reads a ticket, a web page or a PDF that carries one extra sentence, and turn five is a tool call that uploads a credentials file to a domain nobody on the team has ever heard of. Every individual message looked fine. The conversation as a whole did not.</p>
<p>On 29 November, a few days before re:Invent, AWS announced <strong>stateful guardrails</strong> for Amazon Bedrock Guardrails in gated preview. The short version: checks on the <code>InvokeGuardrailChecks</code> API can now see the system prompt and the relevant session history, not only the latest message. There are two checks in the preview. A <em>Stateful Prompt attack</em> check, which is meant to catch attacks spread across turns or hidden in tool results, while cutting false positives on harmless instructions that merely sound like attacks. And a <em>security threat</em> check that reviews user prompts and agent tool calls, flagging malicious domains and IPs, commands that expose credentials or escalate privileges, and tool calls that break a security principle given the session so far.</p>
<p>The line in the announcement I keep coming back to is this one: when your application calls the security threat check before a tool runs, it can stop the call, ask the user to confirm it, or log it. That is AWS telling you where the control belongs. Not around the model. Around the tool.</p>
<p>This post is the pattern I'd use to put that control in place today, with or without preview access.</p>
<h2>Why per-message filtering was never enough</h2>
<p>Classic guardrails evaluate one blob of text at a time. That works for a chatbot answering FAQs. It falls apart for agents for three reasons.</p>
<p><strong>The payload arrives through the side door.</strong> In an agent loop the dangerous text is usually not typed by the user. It comes back as a tool result: a scraped page, a Jira description, an email body. If your filter only runs on user input, it never sees the thing that matters.</p>
<p><strong>The attack is spread out.</strong> "Remember the path I mentioned earlier" on turn two, a harmless-looking file listing on turn three, "now upload that" on turn five. No single message trips a classifier.</p>
<p><strong>"Ignore" is a normal word.</strong> A coding agent told to ignore generated files is doing its job. Per-message prompt-attack filters flag that kind of instruction constantly, and once a filter cries wolf every day, engineers quietly turn it down. The preview explicitly targets this false-positive problem, which tells me AWS heard the same complaint from a lot of teams.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/f2a73134-cbb0-4172-877c-6cae9e9e069c.png" alt="" style="display:block;margin:0 auto" />

<p><em>A quiet multi-turn injection: the dangerous sentence arrives in a tool result on turn four, the model proposes an egress call on turn five, and the static policy stops it before anything is sent.</em></p>
<h2>The pattern: a checkpoint in front of every side effect</h2>
<p>Here is the shape. The model proposes; a gate decides; only then does anything touch the outside world.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/793d7c16-af33-4f80-b17c-a3041661a396.png" alt="" style="display:block;margin:0 auto" />

<p><em>Three layers in front of every side effect, with every decision written to an append-only log.</em></p>
<p>Three layers, in a deliberate order.</p>
<h3>Layer 1: deterministic policy first</h3>
<p>Before any model-based check, run the boring rules. They are cheap, they are explainable to an auditor, and they never hallucinate.</p>
<pre><code class="language-ts">type Decision = 'allow' | 'confirm' | 'block';

interface ProposedCall {
  sessionId: string;
  tool: string;
  args: Record&lt;string, unknown&gt;;
  risk: 'read' | 'write' | 'external';
}

const EGRESS_ALLOWLIST = new Set(['api.github.com', 'hooks.slack.com']);

function staticPolicy(call: ProposedCall): Decision | null {
  if (call.tool === 'http_request') {
    const host = new URL(String(call.args.url)).hostname;
    if (!EGRESS_ALLOWLIST.has(host)) return 'block';
  }
  if (call.tool === 'shell' &amp;&amp; /\b(env|printenv|aws configure|cat .*\.pem)\b/.test(String(call.args.cmd))) {
    return 'block';
  }
  if (call.risk === 'write') return 'confirm';   // humans see every write, for now
  return null;                                    // no opinion, go to layer 2
}
</code></pre>
<p>Notice that the static layer returns <code>null</code> when it has no opinion. That keeps it from becoming a 400-line regex graveyard; it only handles what is genuinely black and white.</p>
<h3>Layer 2: session-aware guardrail checks</h3>
<p>The generally available <code>InvokeGuardrailChecks</code> API already takes a <code>messages</code> array with <code>system</code>, <code>user</code> and <code>assistant</code> roles, and inline <code>checks</code> (<code>contentFilter</code>, <code>promptAttack</code>, <code>sensitiveInformation</code>). Two properties of that API shape the design:</p>
<ul>
<li><strong>It is detect-only.</strong> No check blocks or rewrites anything. You get scores back and the decision stays in your code. That is exactly what you want in a gate.</li>
<li><strong>Checks are inline per request.</strong> You can ask for different checks at different points in the loop without managing a stored guardrail resource.</li>
</ul>
<p>So the gate calls it twice in the loop: once on tool <em>results</em> before they re-enter the context, and once on the <em>proposed call</em> before it runs.</p>
<pre><code class="language-ts">interface GuardrailVerdict { maxSeverity: number; categories: string[] }

// Thin adapter. Today it sends the GA promptAttack check with recent history.
// When preview access lands, the stateful security threat check goes in here,
// and nothing else in the gate has to change.
async function guardrailChecks(
  history: { role: 'system' | 'user' | 'assistant'; text: string }[],
): Promise&lt;GuardrailVerdict&gt; {
  const body = {
    messages: history.map(m =&gt; ({ role: m.role, content: [{ text: m.text }] })),
    checks: { promptAttack: { categories: [
      { category: 'PROMPT_INJECTION' }, { category: 'JAILBREAK' },
    ] } },
  };
  const res = await signedPost('/guardrail-checks/invoke', body); // SigV4-signed
  const hits = res.results?.promptAttack?.results ?? [];
  return {
    maxSeverity: Math.max(0, ...hits.map((h: any) =&gt; h.severityScore ?? 0)),
    categories: hits.map((h: any) =&gt; h.category),
  };
}
</code></pre>
<p>I keep that adapter deliberately thin. The preview's request fields for the two new checks are not in the public API reference yet, and gated previews change shape before GA. Hiding it behind one function means the rest of the gate does not care which version of the check is answering.</p>
<h3>Layer 3: humans for the grey zone</h3>
<p>The third outcome, <em>confirm</em>, is where most teams cut corners. "Ask the user" usually ends up as a modal that people click through. For anything with real side effects I prefer an asynchronous review: on AWS serverless that is a Step Functions task with <code>.waitForTaskToken</code>, or an SQS queue feeding a small review UI. The agent run pauses, the reviewer sees the proposed call <em>plus</em> the last few turns that led to it, and approves or rejects. Since the November Lambda update raised on-demand Event Function timeouts to 30 minutes, short synchronous reviews fit in a single invocation too, but I still would not hold compute open for a human.</p>
<p>Putting it together:</p>
<pre><code class="language-ts">async function gate(call: ProposedCall, history: Turn[]): Promise&lt;Decision&gt; {
  const fixed = staticPolicy(call);
  if (fixed) return log(call, fixed, 'static-policy');

  const v = await guardrailChecks([...history.slice(-8), describeCall(call)]);
  if (v.maxSeverity &gt;= 0.8) return log(call, 'block', 'guardrail', v);
  if (v.maxSeverity &gt;= 0.4 || call.risk === 'external') {
    return log(call, 'confirm', 'guardrail', v);
  }
  return log(call, 'allow', 'guardrail', v);
}
</code></pre>
<p>The thresholds are placeholders; tune them against your own traffic in shadow mode for a couple of weeks before anything is allowed to block.</p>
<h2>The part compliance teams will thank you for</h2>
<p>Every decision goes to an append-only log: session id, tool, a hash of the arguments, which layer decided, the scores, and who approved if a human was involved. In our world of GRC this is not optional decoration. SOC 2 asks you to show that changes and access are authorised and monitored. ISO/IEC 42001 asks you to show human oversight and documented controls over an AI system's actions. A tool-call gate with a decision log produces that evidence as a side effect of running, which is far better than reconstructing it from CloudTrail the week before an audit.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b0e347a491f5283928b308d/b433a85f-22b9-4234-aeee-5df502488547.png" alt="" style="display:block;margin:0 auto" />

<p><em>The decision log is not decoration. It is the evidence SOC 2 and ISO/IEC 42001 already ask you to produce.</em></p>
<p>A few practical notes from thinking this through:</p>
<ul>
<li><strong>Fail closed for writes, open for reads.</strong> If the guardrail call times out, a read-only search can proceed with a log entry; a write waits for a human.</li>
<li><strong>Scan tool results, not just tool calls.</strong> Injection lives in what the agent reads. Run the check on results before they are appended to history.</li>
<li><strong>Watch the latency budget.</strong> This is one more network hop per tool call. Batch reads where you can, and gate the expensive checks to tools tagged <code>write</code> or <code>external</code>.</li>
<li><strong>Keep the model out of its own permissions.</strong> Credentials are scoped per tool by the runtime, never passed through the prompt. The gate is a second line, not the first.</li>
</ul>
<h2>What I'd do this week</h2>
<p>Request preview access if you run agents in us-east-1 or us-west-2. Regardless of the answer, ship the gate with the static layer and the GA prompt-attack check in shadow mode, log everything, and look at what it would have blocked. When the stateful checks become available to you, they slot into one adapter function.</p>
<p>The model will keep getting smarter, and attackers will keep hiding instructions in places it reads. The tool call is the moment intent becomes action. That is where I want a checkpoint.</p>
<p>#AWS #AmazonBedrock #AgenticAI #AISecurity #TypeScript #DevSecOps #ISO42001</p>
]]></content:encoded></item></channel></rss>