{
  "answers": {
    "c00": {
      "noul": 0.01,
      "type": "noul"
    },
    "c01": {
      "noul": 0.01,
      "type": "noul"
    },
    "c02": {
      "noul": 0.99,
      "type": "noul"
    },
    "c03": {
      "noul": 0.44,
      "type": "noul"
    },
    "c04": {
      "noul": 0.84,
      "type": "noul"
    },
    "w00": {
      "noul": 0.97,
      "type": "noul"
    },
    "w01": {
      "noul": 0.97,
      "type": "noul"
    },
    "w02": {
      "noul": 0.97,
      "type": "noul"
    },
    "w03": {
      "noul": 0.98,
      "type": "noul"
    },
    "w04": {
      "noul": 0.98,
      "type": "noul"
    },
    "w05": {
      "noul": 0.98,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T02:18:43Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.01,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.01,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.99,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.44,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.84,
      "question": "c04"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 8952,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "includeDocs": "not a boolean"
          },
          "parameter": "includeDocs",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "vibe-shield 2.1.2 — Scanned 1 file(s) in 12ms\nGrade A+ — 100/100 · no findings\n\nNo findings at or above the requested severity.\n\nnote: No vulnerabilities found across 1 files. Nice.",
          "tool": "vibe_shield_scan"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "limit": "not a number"
          },
          "parameter": "limit",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "vibe-shield 2.1.2 — Audited 0 file(s) in 6ms\nGrade A+ — 100/100 · no findings\n\nNo files were scanned. Check `target`, and whether an ignore file excludes it.\n\nnote: No agent instruction or MCP configuration files were found.",
          "tool": "vibe_shield_audit_skills"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`ruleId` is required, e.g. \"VSB-CLIENT-001\".",
          "tool": "vibe_shield_explain_rule"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "ruleId": {}
          },
          "parameter": "ruleId",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`ruleId` is required, e.g. \"VSB-CLIENT-001\".",
          "tool": "vibe_shield_explain_rule"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "Unknown tool \"didrun_unknown_tool\".",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## VSB-CLIENT-001: Server-only secret exposed through a public environment prefix\n\n- **Severity:** Critical\n- **Confidence:** High\n- **CWE:** CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor\n\nThe rule flags secrets named with public environment-variable prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, or `EXPO_PUBLIC_`. These values can be embedded into the client bundle at build time, making them available to anyone who visits the application.\n\n### Vulnerable pattern\n\n```js\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\nThe `NEXT_PUBLIC_` prefix makes the API key available to browser code.\n\n### Fixed pattern\n\n```js\n// Server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n```\n\nRemoving the public prefix and reading the secret only in server-side code keeps it out of the client bundle.\n\n### Remediation\n\n1. **Rename the variable** to remove the public prefix in `.env`, `.env.local`, and every deployment environment.\n2. **Move all reads to server-only code**, such as a route handler, Server Action, `getServerSideProps`, or API route. Do not import the server module from a `\"use client\"` file.\n3. **Rotate the credential.** A secret that has shipped in a client bundle must be treated as public; removing it from the current code does not undo earlier exposure.\n4. **Expose only values the browser genuinely needs**, such as public URLs or publishable keys. The rule documentation recommends names ending in `_URL`, `_ANON_KEY`, or `_PUBLISHABLE_KEY` for those values.",
          "done_when": "The tool reply shows the documentation for VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "VSB-CLIENT-001"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Explain the vibe-shield rule VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## VSB-CLIENT-001: Server-only secret exposed through a public environment prefix\n\n- **Severity:** Critical\n- **Confidence:** High\n- **CWE:** CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor\n\nThis rule flags secrets stored in environment variables with client-public prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, or `EXPO_PUBLIC_`. Frameworks can embed those values in browser bundles at build time, making them available to visitors.\n\n### Vulnerable pattern\n\n```js\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\nThe public prefix means the API key can be shipped to the browser.\n\n### Fixed pattern\n\n```js\n// Server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n```\n\nThe secret has no public prefix and is read in server-only code. The browser should call the server endpoint rather than receive the secret.\n\n### Remediation\n\n1. **Rename the variable** to remove the public prefix in `.env`, `.env.local`, and every deployment environment.\n2. **Move all reads to server-only code**, such as a route handler, Server Action, `getServerSideProps`, or API route. Do not import the server module into a `\"use client\"` file.\n3. **Rotate the credential.** A secret that appeared in a deployed bundle must be treated as public; removing it from the current code does not undo earlier exposure.\n4. **Expose only values intended for browsers**, such as a public URL or publishable key. The rule documentation suggests names ending in `_URL`, `_ANON_KEY`, or `_PUBLISHABLE_KEY`; the value must actually be safe to publish, regardless of its name.",
          "done_when": "The tool reply shows the documentation for VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "VSB-CLIENT-001"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Explain the vibe-shield rule VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## VSB-CLIENT-001: Server-only secret exposed through a public environment prefix\n\n- **Severity:** Critical\n- **Confidence:** High\n- **CWE:** CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor\n\nPublic environment prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, and `EXPO_PUBLIC_` can cause values to be embedded in client-side bundles at build time. If the value is a secret, visitors can retrieve it from the bundle.\n\n### Vulnerable pattern\n\n```js\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\nThe `NEXT_PUBLIC_` prefix makes the API key available to browser code.\n\n### Fixed pattern\n\n```js\n// Server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n```\n\nThe key has no public prefix and is read in a server-only module.\n\n### Remediation\n\n1. **Rename the variable** to remove the public prefix in `.env`, `.env.local`, and all deployment environments.\n2. **Move every read to server-side code**, such as a route handler, Server Action, `getServerSideProps`, or API route. Do not import the server module from a `\"use client\"` file.\n3. **Rotate the credential.** Treat any secret previously shipped in a client bundle as public; removing it from the code does not undo prior exposure.\n4. **Expose only values the browser genuinely needs**, such as a public URL or publishable key, using names ending in `_URL`, `_ANON_KEY`, or `_PUBLISHABLE_KEY` as appropriate.",
          "done_when": "The tool reply shows the documentation for VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "VSB-CLIENT-001"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Explain the vibe-shield rule VSB-CLIENT-001, including its severity, CWE, vulnerable and fixed code patterns, and remediation steps."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Public environment secret exposure\n\nThe rule **`public-env-secret-exposure`** is **VSB-CLIENT-001**, rated **critical** severity and mapped to **CWE-200: Exposure of Sensitive Information**.\n\n### Why it is exploitable\n\nFrameworks expose environment variables with prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, and `EXPO_PUBLIC_` to browser-side code, often by embedding their values in the client bundle at build time. If one contains an API secret, service-role key, or database URL, visitors can retrieve it from the delivered application and use it with the credential’s privileges.\n\nFor example, this exposes the key:\n\n```ts\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\n### How to fix it\n\n1. **Remove the public prefix** from the secret’s variable name in local environment files and every deployment environment.\n2. **Read the secret only on the server**, such as in an API route, route handler, or server action. Do not import the secret-reading module into client-side code.\n3. **Rotate the credential.** If it was ever included in a client bundle, treat it as compromised; removing it from a new build does not revoke copies from previous deployments.\n4. Expose only values the browser genuinely needs, such as a public URL or publishable key.\n\nFor example, server-side code can use:\n\n```ts\n// Server-only route or module\nconst key = process.env.OPENAI_API_KEY;\n```",
          "done_when": "The tool reply identifies the public-env-secret-exposure rule and provides its explanation of exploitability and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "public-env-secret-exposure"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Look up the public-env-secret-exposure rule by its slug and explain why the issue is exploitable and how to fix it."
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Public environment secret exposure\n\nThe rule **`public-env-secret-exposure`** is **VSB-CLIENT-001**, rated **critical severity** with **high confidence**. It maps to **CWE-200: Exposure of Sensitive Information to an Unauthorized Actor**.\n\n### Why it’s exploitable\n\nFrameworks expose variables with prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, and `EXPO_PUBLIC_` to browser code, typically by embedding their values in the client bundle at build time. Any visitor can inspect that bundle and recover the value.\n\nIf the value is a secret—such as an API secret, service-role key, or credential-bearing database URL—an attacker can use it with whatever privileges it grants. For example:\n\n```js\n// Vulnerable: the key can be included in the browser bundle.\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\n### How to fix it\n\n1. **Remove the public prefix** from the secret’s name in local environment files and every deployment environment.\n2. **Read the secret only on the server**, such as in an API route, route handler, or server action. Don’t import the secret-reading module into client code.\n3. **Rotate the credential.** Removing it from the current build does not revoke copies exposed in earlier deployments.\n4. **Expose only genuinely public values** to the browser, such as a public URL or a publishable key—not a service-role key or API secret.\n\nFor example:\n\n```js\n// Server-only API route\nconst key = process.env.OPENAI_API_KEY;\n```",
          "done_when": "The tool reply identifies the public-env-secret-exposure rule and provides its explanation of exploitability and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "public-env-secret-exposure"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Look up the public-env-secret-exposure rule by its slug and explain why the issue is exploitable and how to fix it."
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## VSB-CLIENT-001: Public environment secret exposure\n\nThe rule is rated **critical severity**, with high confidence, and maps to **CWE-200: Exposure of Sensitive Information to an Unauthorized Actor**.\n\n### Why it is exploitable\n\nFrameworks expose environment variables with prefixes such as `NEXT_PUBLIC_`, `VITE_`, `PUBLIC_`, `REACT_APP_`, and `EXPO_PUBLIC_` to client-side code, often embedding their values in the built JavaScript. Anyone who visits the site can inspect that bundle and recover the value. If it is an API secret, service-role key, or database credential, an attacker can use it with whatever permissions it grants.\n\nFor example, this exposes the key to the browser:\n\n```ts\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n```\n\n### How to fix it\n\n1. **Rename the variable** without the public prefix in local environment files and every deployment environment.\n2. **Read it only on the server**, such as in an API route, route handler, or server action. Do not import the secret-bearing module into client code.\n3. **Rotate the credential.** A key that appeared in a deployed bundle must be treated as compromised; removing it from new builds does not erase old copies.\n4. Expose only values intended to be public, such as a public URL or a publishable key, and ensure their permissions are appropriate.\n\nFor example, a server-side route can read:\n\n```ts\nconst key = process.env.OPENAI_API_KEY;\n```",
          "done_when": "The tool reply identifies the public-env-secret-exposure rule and provides its explanation of exploitability and remediation steps.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "ruleId": "public-env-secret-exposure"
              },
              "reply": "VSB-CLIENT-001 — Server-only secret exposed through a public environment prefix\nclient-exposure · critical severity · high confidence · CWE-200 Exposure of Sensitive Information to an Unauthorized Actor\n\nVariables prefixed with NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ / EXPO_PUBLIC_ are string-replaced into the client bundle at build time. Naming a service-role key, API secret or database URL that way ships the credential to every visitor.\n\nVulnerable\nconst key = process.env.NEXT_PUBLIC_OPENAI_API_KEY;\n\nFixed\n// server-only: app/api/chat/route.ts\nconst key = process.env.OPENAI_API_KEY;\n\nRemediation\n1. Rename the variable so it is server-only (drop the NEXT_PUBLIC_/VITE_/PUBLIC_ prefix) in `.env`, `.env.local` and every deployment environment.\n2. Move every read of it into a server module: App Router route handler, Server Action, `getServerSideProps`, or an API route. Never import that module from a `\"use client\"` file.\n3. Rotate the credential. Anything that ever shipped in a bundle must be treated as public - deleting the line does not un-leak it from previous deploys.\n4. Expose only the value the browser genuinely needs (public URL, publishable key) under a name that ends in `_URL`, `_ANON_KEY` or `_PUBLISHABLE_KEY`.\n\nReferences\n- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables\n- https://vitejs.dev/guide/env-and-mode#env-variables\n- https://supabase.com/docs/guides/api/api-keys",
              "tool": "vibe_shield_explain_rule"
            }
          ],
          "task": "Look up the public-env-secret-exposure rule by its slug and explain why the issue is exploitable and how to fix it."
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M8303HD2ZA5W5YP6NQXBD22W",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.97,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.97,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.97,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.98,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.98,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.98,
      "question": "w05"
    }
  ]
}
