Skip to content

feat(examples): add Genkit Guard example - #201

Open
davidmytton wants to merge 2 commits into
mainfrom
david/cursor/genkit-agent-example
Open

feat(examples): add Genkit Guard example#201
davidmytton wants to merge 2 commits into
mainfrom
david/cursor/genkit-agent-example

Conversation

@davidmytton

Copy link
Copy Markdown
Collaborator

Adds examples/genkit-agent: a Genkit JS genkit() + ai.defineTool + ai.generate() support agent protected by Arcjet Guard, alongside mastra-agent / langgraph-agent / claude-agent. Registered in the root README and scripts/prepare-to-publish.ts.

This is JS Genkit only, not Go / Python. Import path is @arcjet/guard/genkit/v1@arcjet/guard/genkit does not resolve.

const lookupOrder = guardTool(
  arcjet,
  ai.defineTool(
    {
      name: "lookup_order",
      description: "Look up an order",
      inputSchema: z.object({ orderNumber: z.string(), note: z.string().optional() }),
    },
    async ({ orderNumber, note }) => ({ orderNumber, note, status: "shipped" }),
  ),
  {
    action: "order.looked-up",
    onGuardError: "deny",
    rules: (input) => [
      lookupLimit({ key: `order:${input.orderNumber}`, requested: 1 }),
      ...(input.note ? [detectPii(input.note)] : []),
    ],
  },
);

// Screen inbound before generate(). Middleware `model` is not Guard.
const decision = await arcjet.guard({
  label: "message.received",
  rules: [inbound(userText)],
  ...genkitContext({ context: appContext }),
});
if (decision.conclusion === "DENY" || decision.hasFailedOpen()) return blocked();

await ai.generate({
  prompt: userText,
  tools: [lookupOrder, notifyWarehouse],
  use: [guardMiddleware(arcjet, { sessionId: conversationId })],
  context: appContext,
});

guardTool wraps the returned ToolAction, not the inner handler, and overwrites the registry key. DENY is a completed toolResponse.output with arcjetDenied: true — it does not throw, call interrupt(), or set finishReason: "interrupted". guardMiddleware is a { name, instantiate } object whose tool hook gates unwrapped / MCP tools; branded tools are skipped. interrupt() / toolApproval is HITL, not a policy gate. Correlation is the browser-generated conversation id copied onto { sessionId } — never minted on the server.

Vendor pin. @arcjet/guard/genkit/v1 is not on main or npm. @arcjet/guard is pinned to file:./vendor/arcjet-guard built from arcjet-js david/cursor/guard-genkit-v1-8e4b at f7619e4c1c2a4f48a3342b7f8ab74a928ceb7309 (no PR number). SHA is in vendor/SOURCE.txt. Draft until that ships.

Verified. npm run typecheck passes. Node 24+, ARCJET_KEY + AI_GATEWAY_API_KEY.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 20, 2026 21:40
Vendors unpublished @arcjet/guard/genkit/v1 from
arcjet-js@f7619e4c1c2a4f48a3342b7f8ab74a928ceb7309
(david/cursor/guard-genkit-v1-8e4b). Shows inbound screening before
generate(), guardTool on lookup_order, and guardMiddleware on an
unwrapped tool.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
Drop extra comments, page diagnostics, and README sections so the
demo matches mastra-agent's shape.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@davidmytton
davidmytton marked this pull request as ready for review August 25, 2026 20:36

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🔴 High Risk

Decision: Cannot Assess

Rationale: Review failed due to an internal error: unknown error. Escalating to human reviewers.

Review: c41f937c | Powered by Arcjet Review

@socket-security

socket-security Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​genkit-ai/​compat-oai@​1.41.09910010099100
Addednpm/​genkit@​1.41.010010010099100

View full report

@socket-security

socket-security Bot commented Aug 25, 2026

Copy link
Copy Markdown

Caution

Review the following alerts detected in dependencies.

According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Block Medium
Potential vulnerability: npm openai with risk level "medium"

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/@genkit-ai/compat-oai@1.41.0npm/openai@4.104.0

ℹ Read more on: This package | This alert | Navigating potential vulnerabilities

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: It is advisable to proceed with caution. Engage in a review of the package's security aspects and consider reaching out to the package maintainer for the latest information or patches.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/openai@4.104.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm @genkit-ai/core is 66.0% likely to have a medium risk anomaly

Notes: No clear evidence of intentional malware/backdoor behavior in this fragment. However, there are notable security risks: (1) /api/notify accepts a client-provided telemetryServerUrl and passes it to setTelemetryServerUrl without visible validation, which could enable telemetry redirection/exfiltration if telemetry contains sensitive data. (2) Error handling returns stack traces and may include traceId. (3) /api/envs exposes configuredEnvs, which could leak secrets. These issues depend on whether the server is strictly bound to localhost and whether telemetry/env contents are non-sensitive. More context (what action.run processes, what telemetry sends, and how configuredEnvs is constructed) is needed for a definitive assessment.

Confidence: 0.66

Severity: 0.62

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@genkit-ai/core@1.41.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@genkit-ai/core@1.41.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm @genkit-ai/firebase is 78.0% likely to have a medium risk anomaly

Notes: Overall, the module primarily performs Firebase Auth and App Check token verification and then enforces claim-based authorization. However, it contains an explicit debug feature that can bypass cryptographic verification of both Auth and App Check tokens by base64-decoding attacker-supplied tokens (unsafeDecodeToken) when FIREBASE_DEBUG_MODE and FIREBASE_DEBUG_FEATURES indicate skipTokenVerification. If these environment variables are enabled outside a controlled development environment, this can allow authentication/authorization bypass. No direct malware behaviors (exfiltration, shelling, persistence) are present in this fragment.

Confidence: 0.78

Severity: 0.62

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@genkit-ai/firebase@1.41.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@genkit-ai/firebase@1.41.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm @genkit-ai/firebase is 78.0% likely to have a medium risk anomaly

Notes: No overt malware behaviors (e.g., exfiltration, shell execution, persistence) are present in this module. However, the code contains a high-impact authorization bypass mechanism: in debug mode (driven by environment variables and also setDebugSkipTokenVerification()), it skips Firebase token verification and instead unsafe-decodes token payloads and treats them as valid. If misconfigured in production or exposed via runtime toggling, an attacker could forge tokens and gain unauthorized access. Overall risk is mainly an authentication/authorization security footgun rather than malicious sabotage.

Confidence: 0.78

Severity: 0.56

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@genkit-ai/firebase@1.41.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@genkit-ai/firebase@1.41.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm @opentelemetry/instrumentation-fastify is 80.0% likely to have a medium risk anomaly

Notes: The provided code is a standard utility module for OpenTelemetry instrumentation. It manages span lifecycle and safe execution patterns. No malicious behavior or data exfiltration detected. Security risk is low when used as intended; verify that span attributes do not accidentally include sensitive data.

Confidence: 0.80

Severity: 0.50

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/instrumentation-fastify@0.38.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/instrumentation-fastify@0.38.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm agentkeepalive is 72.0% likely to have a medium risk anomaly

Notes: Overall, the provided code is a specialized HTTP agent extension aimed at improving connection keep-alive behavior and socket lifecycle management. It implements careful timeout handling and diagnostics, with only minor anomalous behavior in deprecated option handling and logging. There is no evidence of malware, data exfiltration, backdoors, or supply-chain attacks within this fragment. The primary security risk lies in verbose or leaked logs from deprecation messages and the potential for timing-related edge-case bugs if misconfigured, but these do not constitute malicious activity.

Confidence: 0.72

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/@genkit-ai/compat-oai@1.41.0npm/agentkeepalive@4.6.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/agentkeepalive@4.6.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm cjs-module-lexer is 66.0% likely to have a medium risk anomaly

Notes: This module is a WebAssembly-backed parser wrapper that extracts export/re-export identifiers from a source string. The most significant security issue is that it calls (0, eval) on substrings derived from the input whenever they begin with quotes, creating a potential arbitrary code execution risk if an attacker can influence the parsed source. It also throws errors that embed excerpts/line context from the input, which may leak source content into logs or consuming applications. No clear indicators of network exfiltration or system-level malware behavior are visible in this JS wrapper alone, but the eval usage warrants strong scrutiny and sandboxing or removal of dynamic evaluation.

Confidence: 0.66

Severity: 0.65

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/cjs-module-lexer@1.4.3

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/cjs-module-lexer@1.4.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm gaxios is 63.0% likely to have a medium risk anomaly

Notes: This code most likely functions as a test/build orchestrator: it starts a temporary Express server, reflects unvalidated Origin into CORS headers, echoes attacker-controlled multipart field content (fields.null) and query strings directly into responses, then spawns a local karma start process and shuts down. While there is no explicit malicious payload in the snippet (e.g., no backdoor or outbound exfiltration), the combination of reflected CORS and runtime host command execution is security-relevant and should be reviewed/isolated before use as a dependency.

Confidence: 0.63

Severity: 0.52

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/gaxios@7.3.1

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/gaxios@7.3.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm google-auth-library is 75.0% likely to have a medium risk anomaly

Notes: The code reflects a conventional, legitimate Google ID Token client implementation. There are no signs of malicious behavior such as data exfiltration, backdoors, or hidden I/O within this fragment. Primary risks stem from external dependencies (idTokenProvider) and environmental compatibility for the Fetch API Headers. Overall, low to moderate security risk for this isolated fragment with attention to provider trust and runtime environment.

Confidence: 0.75

Severity: 0.50

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/google-auth-library@10.9.1

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/google-auth-library@10.9.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm google-auth-library is 75.0% likely to have a medium risk anomaly

Notes: The PluggableAuthClient at package/build/src/auth/pluggable-auth-client.js retrieves tokens by running a user-specified external executable with environment gates, timeout bounds, and output validation. This design expands the trusted code surface and can lead to arbitrary tokens or data leakage, especially via the external process and a file-based cache. Mitigations include restricting executable sources, securing and validating the output cache, enforcing strict file permissions, auditing executable usage, and operating within controlled environments.

Confidence: 0.75

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/google-auth-library@10.9.1

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/google-auth-library@10.9.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm http-proxy-agent is 75.0% likely to have a medium risk anomaly

Notes: The code fragment is a conventional HTTP proxy agent component handling optional proxy authentication and dynamic header adjustments. There is no evidence of malicious activity, data exfiltration, or supply-chain abuse within this fragment. The main concerns relate to reliance on internal Node.js fields (version fragility) and potential in-memory exposure of credentials, but these are standard operational caveats for proxy clients and do not indicate malice.

Confidence: 0.75

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/http-proxy-agent@5.0.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/http-proxy-agent@5.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm import-in-the-middle is 90.0% likely to have a medium risk anomaly

Notes: The code is a test harness that installs and imports many npm packages to validate that an experimental loader doesn't change exports. I find no direct indicators of intent to exfiltrate data or persist a backdoor in this fragment. However, the script intentionally performs high-risk operations: it programmatically installs and imports many third-party packages which allows those packages' lifecycle/install scripts and module top-level code to execute on the host. That execution surface makes this script potentially dangerous to run in an untrusted environment. If you plan to run it, do so in an isolated/sandboxed environment (e.g., ephemeral container) to avoid exposure to malicious package install-time or import-time behavior.

Confidence: 0.90

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/import-in-the-middle@1.15.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/import-in-the-middle@1.15.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm openai is 68.0% likely to have a medium risk anomaly

Notes: The code is not inherently malicious, but it introduces a security risk by placing the Authorization Bearer token into the WebSocket URL query parameters. This can lead to token exposure through logs, browser history, and intermediate proxies. The rest of the code (send/close, error handling) is standard WebSocket management. In the OpenVSX extension context, this could enable token leakage if logs or telemetry capture URL query parameters. Recommend refactoring to avoid sending credentials in URL/query and instead use headers where possible, or implement a secure token exchange mechanism with short-lived tokens and strict logging controls.

Confidence: 0.68

Severity: 0.55

From: examples/genkit-agent/package-lock.jsonnpm/@genkit-ai/compat-oai@1.41.0npm/openai@4.104.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/openai@4.104.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm require-in-the-middle is 74.0% likely to have a medium risk anomaly

Notes: No direct malicious payload is present in this file (no exfiltration/process/file tampering or dynamic code execution), and the code is not obfuscated. However, it is a powerful process-wide require-hook that globally intercepts module loading and can alter what the application receives via a caller-supplied onrequire callback. Security impact depends heavily on trust in the embedding code/callback and the strictness of whitelist/internals configuration; treat as a sensitive supply-chain/instrumentation primitive requiring review and operational safeguards.

Confidence: 0.74

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/require-in-the-middle@7.5.2

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/require-in-the-middle@7.5.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Potential code anomaly (AI signal): npm zod is 90.0% likely to have a medium risk anomaly

Notes: No explicit network exfiltration, reverse shell, or credential theft is present in this fragment. However, the code assembles and compiles arbitrary code via the Function constructor and invokes passed-in functions immediately (twice). That behavior constitutes a strong dangerous primitive (arbitrary code execution) which can be abused if any inputs (strings or args) are attacker-controlled. Treat this module as risky in threat models where inputs are not fully trusted; review call sites and sanitize/validate inputs or avoid dynamic evaluation.

Confidence: 0.90

Severity: 0.60

From: examples/genkit-agent/package-lock.jsonnpm/@genkit-ai/compat-oai@1.41.0npm/genkit@1.41.0npm/zod@3.25.76

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/zod@3.25.76. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @google-cloud/logging-api in module globalThis["fetch"]

Module: globalThis["fetch"]

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@google-cloud/logging-api@0.2.0

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@google-cloud/logging-api@0.2.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @google-cloud/modelarmor in module globalThis["fetch"]

Module: globalThis["fetch"]

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@google-cloud/modelarmor@0.4.1

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@google-cloud/modelarmor@0.4.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/exporter-zipkin in module http

Module: http

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/exporter-zipkin@1.25.1

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/exporter-zipkin@1.25.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/exporter-zipkin in module https

Module: https

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/exporter-zipkin@1.25.1

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/exporter-zipkin@1.25.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/instrumentation-net in module tls

Module: tls

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/instrumentation-net@0.38.0

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/instrumentation-net@0.38.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/otlp-exporter-base in module http

Module: http

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/otlp-exporter-base@0.52.1

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/otlp-exporter-base@0.52.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/otlp-exporter-base in module https

Module: https

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/otlp-exporter-base@0.52.1

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/otlp-exporter-base@0.52.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Network access: npm @opentelemetry/resource-detector-alibaba-cloud in module http

Module: http

Location: Package overview

From: examples/genkit-agent/package-lock.jsonnpm/genkit@1.41.0npm/@opentelemetry/resource-detector-alibaba-cloud@0.29.7

ℹ Read more on: This package | This alert | What is network access?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@opentelemetry/resource-detector-alibaba-cloud@0.29.7. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

See 62 more rows in the dashboard

Ignoring alerts on:

  • npm/@types/pg@8.6.1

View full report

@davidmytton

Copy link
Copy Markdown
Collaborator Author

@SocketSecurity ignore npm/@types/pg@8.6.1

@davidmytton
davidmytton enabled auto-merge August 25, 2026 20:42
@davidmytton

Copy link
Copy Markdown
Collaborator Author

@SocketSecurity ignore-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants