AI Slop Code Risk Monitor

Portkey-AI/gateway

SlopCodeMonitor badge for Portkey-AI/gateway Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.

0.9 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for Portkey-AI/gateway, a TypeScript project with 13,459 GitHub stars. SynthScan examined 127,603 lines of code across 669 source files, recording 72 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

0.9
Adjusted Signal
0.9
Raw Pattern Score
100%
Time Factor
2026-11-20
Last Push
13.5K
Stars
TypeScript
Language
127.6K
Lines of Code
669
Files
72
Pattern Hits
2026-11-27
Scan Date
0.01
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-27.

Cognitive Ownership Risk 3.5/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 59 finding(s).

Hallucinated Dependency & Supply Chain Risk 1.1/100 · LOW

Are imports declared and package/API names verified? 13 finding(s).

Agent Over-Engineering Ratio 0.9/100 · LOW

Are wrappers, guards, and repeated structures necessary? 23 finding(s).

PR Review Velocity Impact 5.0/100 · LOW

Which changes need focused human review? 72 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 4MEDIUM 20LOW 48

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 72 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Modern AI Meta-Vocabulary16 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md151<img src="https://portkey.ai/blog/content/images/size/w1600/2024/11/image-15.png" width=600 title="Request flow through CODE
MEDIUMREADME.md201- <a href="https://portkey.wiki/gh-88">**Guardrails**</a>: Verify your LLM inputs and outputs to adhere to your specifieCODE
MEDIUMplugins/README.md11 - [Guardrails](#guardrails)CODE
MEDIUMplugins/portkey/globals.ts5export const BASE_URL = 'https://api.portkey.ai/v1/execute-guardrails';CODE
MEDIUMplugins/javelin/guardrails.ts45 const apiUrl = `https://${domain}/v1/guardrails/apply`;CODE
MEDIUMplugins/javelin/guardrails.ts243 // All guardrails passedCOMMENT
MEDIUMcookbook/integrations/vercel/readme.md257Read more about Guardrails [here](https://docs.portkey.ai/features/guardrails).CODE
MEDIUM…grations/vercel/app/examples/generate-text/fallback.ts33 //Portkey's config allows you to use- loadbalance, fallback, retires, timeouts, semantic caching, conditional routinCOMMENT
MEDIUM…rcel/app/examples/generate-text/conditional-routing.ts46 //Portkey's config allows you to use- loadbalance, fallback, retires, timeouts, semantic caching, conditional routinCOMMENT
MEDIUM…ations/vercel/app/examples/generate-text/guardrails.ts30 //Portkey's config allows you to use- loadbalance, fallback, retires, timeouts, semantic caching, conditional routinCOMMENT
MEDIUM…ions/vercel/app/examples/generate-text/load-balance.ts35 //Portkey's config allows you to use- loadbalance, fallback, retires, timeouts, semantic caching, conditional routinCOMMENT
MEDIUM…tegrations/vercel/app/examples/generate-text/action.ts11 //Portkey's config allows you to use- loadbalance, fallback, retires, timeouts, semantic caching, conditional routinCOMMENT
MEDIUM.github/README.jp.md224 <strong><a href="https://docs.portkey.ai/docs/product/guardrails">ガードレール</a></strong></br><br/>CODE
MEDIUMsrc/public/index.html1063 <a class="feature-item" href="https://portkey.ai/docs/product/guardrails">CODE
MEDIUMsrc/handlers/handlerUtils.ts244 // if the deny key is present (true or false), add it to hooksObject and remove it from guardrailsCOMMENT
MEDIUMsrc/handlers/handlerUtils.ts509 // To avoid redundant conversion of guardrails to hooks, we do this check.COMMENT
Hyper-Verbose Identifiers23 hits · 23 pts
SeverityFileLineSnippetContext
LOWplugins/azure/utils.ts5export async function getAccessTokenFromEntraId(CODE
LOWplugins/azure/utils.ts59export async function getAzureManagedIdentityToken(CODE
LOWplugins/bedrock/util.ts144export async function getAssumedRoleCredentials(CODE
LOWplugins/acuvity/scan.test.ts7export function getPromptInjectionParameters(): PluginParameters {CODE
LOWplugins/acuvity/scan.test.ts91export function getSecretsRedactedParameters(): PluginParameters {CODE
LOW…roviders/google-vertex-ai/transformGenerationConfig.ts11export function transformGenerationConfig(params: PortkeyGeminiParams) {CODE
LOW…roviders/google-vertex-ai/transformGenerationConfig.ts86export function transformEmbeddingsParameters(params: GoogleEmbedParams) {CODE
LOWsrc/providers/bedrock/messages.ts516function createContentBlockStartEvent(CODE
LOWsrc/providers/bedrock/utils.ts229export async function getAssumedRoleCredentials(CODE
LOWsrc/providers/bedrock/utils.ts388export async function providerAssumedRoleCredentials(CODE
LOWsrc/providers/azure-openai/utils.ts6export async function getAccessTokenFromEntraId(CODE
LOWsrc/providers/azure-openai/utils.ts43export async function getAzureManagedIdentityToken(CODE
LOWsrc/providers/azure-openai/utils.ts71export async function getAzureWorkloadIdentityToken(CODE
LOWsrc/middlewares/requestValidator/index.ts433function isAlternativeIPRepresentation(host: string, parts: string[]): boolean {CODE
LOWsrc/shared/services/cache/index.ts303export function getTokenIntrospectionCache(): CacheService {CODE
LOWsrc/shared/services/cache/backends/cloudflareKV.ts223export function createCloudflareKVBackend(CODE
LOWsrc/public/index.html1663 function getRoutingConfigCodeBlock(language, type) {CODE
LOWsrc/handlers/handlerUtils.ts836export function constructConfigFromRequestHeaders(CODE
LOWsrc/handlers/handlerUtils.ts1182export async function recursiveAfterRequestHookHandler(CODE
LOWsrc/handlers/streamHandler.ts292export function handleOctetStreamResponse(response: Response) {CODE
LOWsrc/handlers/streamHandler.ts414export async function handleJSONToStreamResponse(CODE
LOWsrc/handlers/createTranscriptionHandler.ts15export async function createTranscriptionHandler(CODE
LOWsrc/handlers/messagesCountTokensHandler.ts16export async function messagesCountTokensHandler(CODE
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHplugins/README.md169 "apiKey": "your-api-key-here"CODE
HIGH…-cases/use-openai-sdk-with-portkey-prompt-templates.md41We will use `axios` to make a `POST` call to `/prompts/${PROMPT_ID}/render` endpoint along with headers (includes [PortkCODE
HIGH…ent-loadbalancing-with-failure-mitigating-fallbacks.md11You should have the [Portkey API Key](https://portkey.ai/docs/api-reference/authentication#obtaining-your-api-key). PleaCODE
HIGH…k/getting-started/writing-your-first-gateway-config.md34Along with Portkey API Key ([get one](https://portkey.ai/docs/api-reference/authentication#obtaining-your-api-key)), youCODE
Fake / Example Data9 hits · 9 pts
SeverityFileLineSnippetContext
LOWplugins/default/default.test.ts331 "name": "John Doe",CODE
LOWplugins/default/default.test.ts336 "number": "555-0123"CODE
LOWplugins/default/default.test.ts397 name: 'John Doe',CODE
LOWplugins/default/default.test.ts402 number: '555-0123',CODE
LOWplugins/default/default.test.ts421 "name": "John Doe",CODE
LOWplugins/panw-prisma-airs/panw.airs.test.ts19 credentials: { AIRS_API_KEY: 'dummy-key' },CODE
LOWplugins/panw-prisma-airs/panw.airs.test.ts46 credentials: { AIRS_API_KEY: 'dummy-key' },CODE
LOWplugins/panw-prisma-airs/panw.airs.test.ts64 credentials: { AIRS_API_KEY: 'dummy-key' },CODE
LOWplugins/panw-prisma-airs/panw.airs.test.ts83 credentials: { AIRS_API_KEY: 'dummy-key' },CODE
Structural Annotation Overuse6 hits · 9 pts
SeverityFileLineSnippetContext
LOWcookbook/use-cases/supabase-pgvector-and-portkey.md84### Step 1: Importing and authenticating Portkey and SupabaseCOMMENT
LOWcookbook/use-cases/supabase-pgvector-and-portkey.md105### Step 2: Create a TableCOMMENT
LOWcookbook/use-cases/supabase-pgvector-and-portkey.md126## Step 3: Read, Generate and Store embeddingsCOMMENT
LOWcookbook/use-cases/supabase-pgvector-and-portkey.md190### Step 4: Create a database function to query similar matchCOMMENT
LOWcookbook/use-cases/supabase-pgvector-and-portkey.md226### Step 5: Query for the similarity matchCOMMENT
LOWsrc/providers/bedrock/uploadFile.ts56 // Step 5: Send RequestCOMMENT
Over-Commented Block8 hits · 8 pts
SeverityFileLineSnippetContext
LOWplugins/pillar/scanPrompt.ts41 // result is an object with the following structure:COMMENT
LOWplugins/sydelabs/sydeguard.ts41 {COMMENT
LOWplugins/sydelabs/sydeguard.ts61 // "category": "PROMPT_INJECT",COMMENT
LOWplugins/aporia/validateProject.ts81 // "revised_response": "Modified response based on policy",COMMENT
LOWcookbook/integrations/vercel/next-env.d.ts1/// <reference types="next" />COMMENT
LOWsrc/providers/google-vertex-ai/chatComplete.ts261 top_logprobs: {COMMENT
LOWsrc/public/index.html1441 </script>COMMENT
LOWsrc/public/index.html1461 // -H <span class="hljs-string">"x-portkey-aws-secret-access-key: <span class="highlighted-value ${vars.providerDeCOMMENT
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMplugins/qualifire/qualifire.test.ts1226 text: 'I cannot provide personal email addresses as that would be a privacy concern.',CODE
MEDIUMplugins/qualifire/qualifire.test.ts1300 'I cannot provide personal email addresses as that would be a privacy concern.',CODE
MEDIUMplugins/qualifire/qualifire.test.ts1322 'I cannot provide personal email addresses as that would be a privacy concern.',CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMplugins/default/addPrefix.ts81 // If this is the last message, leverage utils to ensure messages route compatibilityCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWplugins/acuvity/scan.test.ts125// Example usage:COMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/providers/bedrock/uploadFile.ts56 // Step 5: Send RequestCOMMENT