# PAC rule catalogue

Source: https://findproxyforurl.net/rules/ · last updated 2026-10-06

Every check the checker runs against a proxy.pac or wpad.dat file. Each rule explains why it matters, how the engines behave, and shows a bad and a good example you can open in the checker.



New rules are in development and are added here once they have been checked against the engines.

- PAC-B001 [if statement without braces](https://findproxyforurl.net/rules/if-without-braces/index.md) (low): if (cond) return "DIRECT"; works, but the next person who adds a line under it changes the logic without noticing. PAC files are edited in production by people who are not JavaScript developers; braces are cheap insurance.
- PAC-B002 [Parameters not named url and host](https://findproxyforurl.net/rules/nonstandard-parameter-names/index.md) (info): Engines pass the arguments by position, so function FindProxyForURL(u, h) works. Every document, example and reviewer assumes url and host; deviating names invite mix-ups between the two (PAC-C001).
- PAC-B003 [Unused functions or variables](https://findproxyforurl.net/rules/unused-code/index.md) (low): Helper functions and variables that nothing references are leftovers from earlier versions. They are harmless to the engine but mislead reviewers and hide the rules that actually run.
- PAC-B004 [Default route has no comment](https://findproxyforurl.net/rules/undocumented-default-route/index.md) (info): The final unconditional return is the most consequential line in the file; it decides every request no exception matched. A one-line comment stating the intended default ("everything else via the corporate proxy") documents the design and is one of the conditions for an A+ grade.
- PAC-B005 [Same proxy string repeated many times](https://findproxyforurl.net/rules/repeated-proxy-string-literal/index.md) (info): Writing "PROXY proxy.corp.example:8080" in a dozen places means a dozen edits when the proxy moves and a dozen chances for a typo in one of them.
- PAC-B006 [isPlainHostName alone sends every single-label name direct](https://findproxyforurl.net/rules/plain-hostname-blanket-direct/index.md) (info): isPlainHostName(host) is true for any name without a dot, including a mistyped public name. The user then gets a local resolver error instead of the proxy's block page. Fine as a performance short-cut, weak as the only definition of "internal".
- PAC-B007 [*.local routed direct](https://findproxyforurl.net/rules/dot-local-direct/index.md) (info): Routing *.local direct is right where .local is reserved for mDNS/Bonjour. Older enterprises still use .local as their internal DNS suffix; there the rule is also right, but it must be a deliberate decision rather than a template copy.
- PAC-B008 [Long list of public hostnames routed around the proxy](https://findproxyforurl.net/rules/bypass-list-in-pac/index.md) (low): A PAC that lists dozens of public SaaS, identity-provider or update hostnames as DIRECT has turned into a security policy document with weak change control. Routing belongs in the PAC; bypass and inspection decisions belong on the proxy.
- PAC-B009 [Result assembled in a variable instead of returned per rule](https://findproxyforurl.net/rules/mutable-result-variable/index.md) (low): var proxy = ...; if (a) proxy = ...; if (b) proxy = ...; return proxy; inverts the usual semantics (last match wins instead of first) and evaluates every condition, including DNS lookups, for every request.
- PAC-B010 [Empty block](https://findproxyforurl.net/rules/empty-block/index.md) (low): An if, else or catch with an empty body is usually an unfinished edit. The condition is still evaluated (possibly a DNS lookup) and the reader has to guess what was intended.
- PAC-B011 [Single proxy without a fallback entry](https://findproxyforurl.net/rules/no-proxy-failover/index.md) (info): A return with a single PROXY entry gives the browser no alternative when that proxy is down. A second proxy in the list keeps inspection in place during an outage; what should happen when all proxies are down is a design decision (see PAC-X014).
- PAC-B012 [Single Zscaler gateway without ${SECONDARY_GATEWAY}](https://findproxyforurl.net/rules/zscaler-no-secondary-gateway/index.md) (medium): Zscaler's variables come in pairs for a reason: ${GATEWAY} is the closest Public Service Edge and ${SECONDARY_GATEWAY} the next one. A return with only the primary leaves the browser without a proxy during a data-centre outage or maintenance.
- PAC-B013 [PAC sends traffic to a proxy the Netskope Client may not know](https://findproxyforurl.net/rules/netskope-undeclared-third-party-proxy/index.md) (low): When the Netskope Client runs on a device whose PAC file also points at other proxies, Netskope requires those proxies to be declared in the Client configuration ("Interoperate with Proxy"). The Client then intercepts CONNECT requests to them and steers managed destinations through its tunnel.
- PAC-B014 [DIRECT in the PAC does not bypass the vendor's agent](https://findproxyforurl.net/rules/agent-intercepts-pac-direct-traffic/index.md) (info): With an SSE agent installed, the PAC is evaluated first by the application or OS, and the agent intercepts afterwards at the TCP or driver level. A DIRECT in the PAC therefore means "not through this proxy", not "not through the agent"; the destination also needs the agent's own bypass.
- PAC-B015 [Selected vendor pack, but the PAC never routes to that vendor](https://findproxyforurl.net/rules/sse-vendor-gateway-not-referenced/index.md) (info): The vendor packs recognise the vendor's gateway by its host name pattern or PAC variable. If the file never returns such an entry, either the wrong pack is selected or the file is an agent-only steering PAC; the pack's gateway checks then have nothing to check.
- PAC-C001 [Hostname pattern applied to url instead of host](https://findproxyforurl.net/rules/url-instead-of-host/index.md) (high): url is the request address as the browser passes it (scheme, host and port always; path, query or user name only in some engines); host is the bare hostname. A hostname pattern tested against url either never matches or matches far too much. The most common PAC mistake.
- PAC-C002 [URL scheme in a host pattern](https://findproxyforurl.net/rules/scheme-in-host-pattern/index.md) (medium): host never contains "://". A pattern such as "http://intranet.corp.example" can never match it; the branch is dead code and the request takes the default route.
- PAC-C003 [Path, port or query characters in a host pattern](https://findproxyforurl.net/rules/invalid-host-pattern-characters/index.md) (medium): host contains no slash, colon, question mark, space or port. A host pattern with any of these can never match.
- PAC-C004 [Wildcard characters in dnsDomainIs or localHostOrDomainIs](https://findproxyforurl.net/rules/dnsdomainis-with-glob/index.md) (medium): dnsDomainIs and localHostOrDomainIs compare strings literally. "*.corp.example" is looked for as the literal characters *.corp.example, which no hostname contains.
- PAC-C005 [isPlainHostName called with url](https://findproxyforurl.net/rules/isplainhostname-on-url/index.md) (medium): isPlainHostName returns true for names without a dot. A URL always contains dots (and slashes), so isPlainHostName(url) is permanently false and the branch never fires.
- PAC-C006 [Bitwise | or & used instead of || or &&](https://findproxyforurl.net/rules/bitwise-or-in-condition/index.md) (medium): A single | or & converts both operands to 32-bit integers. For booleans the result is accidentally right, but both sides are always evaluated and non-boolean operands produce 0, which silently drops the branch.
- PAC-C007 [RFC 1918 range with the wrong mask](https://findproxyforurl.net/rules/wrong-rfc1918-mask/index.md) (medium): 172.16.0.0 with mask 255.255.0.0 covers only 172.16.x.x. The private block is 172.16.0.0/12 (mask 255.240.0.0), i.e. 172.16.0.0 to 172.31.255.255; the /16 misses fifteen sixteenths of it.
- PAC-C008 [Only 127.0.0.1 excluded instead of 127.0.0.0/8](https://findproxyforurl.net/rules/loopback-only-127-0-0-1/index.md) (low): The entire 127.0.0.0/8 block is loopback. A PAC that only exempts 127.0.0.1 sends 127.0.0.2 or 127.1.2.3 (used by local development tools and some agents) to the proxy, where the connection fails.
- PAC-C009 [Domain matched exactly, subdomains not covered](https://findproxyforurl.net/rules/apex-without-subdomains/index.md) (low): host == "example.com" matches exactly that name. www.example.com, api.example.com and every other subdomain fall through. If the whole site was meant, add the subdomain pattern.
- PAC-C010 [dnsDomainLevels used without excluding IP literals](https://findproxyforurl.net/rules/dnsdomainlevels-on-ip-literal/index.md) (low): dnsDomainLevels counts dots. 192.0.2.10 has three, like a.b.c.example. A "this is a fully qualified name" test based on it also matches every IPv4 address.
- PAC-C011 [Very short or trailing-dot dnsDomainIs pattern](https://findproxyforurl.net/rules/dnsdomainis-short-pattern/index.md) (medium): Patterns like ".uk." (trailing dot) or ".ab" are suspicious. A pattern with a trailing dot matches only when the address itself was typed with a trailing dot; a two-letter suffix without a label is a TLD or a typo.
- PAC-C012 [IPv4 loopback/private ranges handled, IPv6 equivalents not](https://findproxyforurl.net/rules/ipv6-not-handled/index.md) (info): The PAC routes 127.0.0.0/8 or RFC 1918 literals DIRECT but has no equivalent for ::1, link-local or unique-local IPv6 addresses. IPv6 literal hosts take the default route, usually the proxy.
- PAC-C013 [Identical condition appears twice](https://findproxyforurl.net/rules/duplicate-condition/index.md) (low): The same condition (or the same pattern literal in the same function) occurs more than once. If the first occurrence returns, the second is dead; if it does not, one of them is probably a copy-paste error.
- PAC-C014 [Branch can never match because an earlier branch covers it](https://findproxyforurl.net/rules/shadowed-condition/index.md) (medium): A later, more specific rule (www.corp.example -> proxy) is unreachable because an earlier, broader rule (*.corp.example -> DIRECT) returns for the same hosts. First match wins.
- PAC-C015 [URL pattern pinned to http:// only](https://findproxyforurl.net/rules/scheme-pinned-url-pattern/index.md) (info): A url pattern starting with "http://" does not match "https://". Most sites are https today; unless different routing for plain http is intended, the rule is probably outdated.
- PAC-C016 [isInNet arguments in the wrong order](https://findproxyforurl.net/rules/isinnet-parameter-order/index.md) (high): isInNet(host, network, mask) is the order. isInNet("10.0.0.0", host, "255.0.0.0") compares the network literal against a mask derived from the hostname and is false for every request.
- PAC-C017 [Condition is a constant](https://findproxyforurl.net/rules/constant-condition/index.md) (medium): if (true), if (0) or if ("DIRECT") does not depend on the request. Everything after an always-true branch that returns is dead; an always-false branch is dead itself.
- PAC-C018 [Upper-case letters in a hostname pattern](https://findproxyforurl.net/rules/uppercase-pattern-literal/index.md) (medium): Browsers hand the PAC a lower-cased hostname, so a pattern such as "Intranet.Corp.Example" never matches in Chromium or Firefox. Where the host keeps its case (Windows programs using WinHTTP, such as BITS), comparisons are case-sensitive, so write patterns in lower case and lower-case host.
- PAC-C019 [Zscaler gateway on an undocumented port](https://findproxyforurl.net/rules/zscaler-service-edge-port/index.md) (medium): Zscaler Public Service Edges accept browser traffic on ports 80, 443, 9400, 9443 and 9480, plus dedicated ports your organisation subscribes to. Any other port in a ${GATEWAY} entry means the browser tries, fails and falls through to the next entry.
- PAC-C020 [Forwarding Profile and App Profile roles mixed in one Zscaler Client Connector PAC](https://findproxyforurl.net/rules/zscaler-forwarding-and-app-pac-mixed/index.md) (high): Zscaler Client Connector uses two PAC files with different jobs. The Forwarding Profile PAC steers traffic to the client (${ZAPP_LOCAL_PROXY}) or around it; the App Profile PAC sends what the client received to the cloud (${GATEWAY}). A file that does both is used in the wrong slot somewhere.
- PAC-C021 [Netskope explicit proxy on the wrong port](https://findproxyforurl.net/rules/netskope-explicit-proxy-port/index.md) (high): Netskope's Cloud Explicit Proxy requires the browser to use port 8081; Explicit Proxy over Tunnel uses 163.116.128.80/81 or epot.goskope.com on port 80 (recommended) or 8080. Other ports are dropped, so the browser waits, fails and falls through.
- PAC-C022 [Identity provider not excluded from the SSE proxy](https://findproxyforurl.net/rules/sse-idp-not-bypassed/index.md) (medium): Explicit proxies that authenticate through SAML redirect the browser to the identity provider. If the IdP itself is reached through the proxy, the login loops. Netskope, Cloudflare and Palo Alto Networks all require the IdP to be bypassed in the PAC.
- PAC-C023 [Non-HTTP URLs reach a proxy that only accepts HTTP and HTTPS](https://findproxyforurl.net/rules/sse-proxy-for-non-http-schemes/index.md) (low): Cloud explicit proxies accept HTTP and HTTPS. Zscaler, Netskope and Palo Alto Networks all start their sample PAC files with a DIRECT for ftp: URLs; without such a guard, ftp: and other scheme requests from older clients are sent to a proxy that drops them.
- PAC-C024 [Skyhigh cloud proxy on a port browsers cannot use](https://findproxyforurl.net/rules/skyhigh-cloud-proxy-port/index.md) (high): The Skyhigh Secure Web Gateway cloud proxy c<customer-id>.wgcs.skyhigh.cloud is configured with port 80 or 8080. Port 8081 is the Client Proxy Secure Channel port and is not a browser proxy port; any other port is a dead entry.
- PAC-C025 [Secure Web Gateway itself is not returned DIRECT](https://findproxyforurl.net/rules/skyhigh-web-gateway-not-excluded/index.md) (medium): An on-premises Skyhigh Secure Web Gateway talks to the browser directly for block pages, coaching pages, authentication redirects (port 9094) and injected files (port 9999). If the PAC proxies requests to the gateway's own host name or address, those pages break.
- PAC-C026 [Plain hostnames or private addresses are sent to the cloud proxy](https://findproxyforurl.net/rules/sse-local-traffic-not-bypassed/index.md) (medium): A PAC file that uses an SSE cloud proxy must first return DIRECT for plain hostnames and private (RFC 1918) addresses: the cloud proxy cannot reach intranet hosts, and an agent's local-traffic exclusion does not catch a request already sent to the proxy.
- PAC-C027 [Cloudflare Gateway proxy endpoint with PROXY instead of HTTPS](https://findproxyforurl.net/rules/cloudflare-gateway-endpoint-needs-https-keyword/index.md) (high): Cloudflare Gateway proxy endpoints only accept TLS from the browser. The PAC must return "HTTPS <subdomain>.proxy.cloudflare-gateway.com:443"; "PROXY ..." to the same host fails for every request and the browser falls through to the next entry or to an error.
- PAC-C028 [Cloudflare Gateway proxy endpoint on a port other than 443](https://findproxyforurl.net/rules/cloudflare-gateway-endpoint-port/index.md) (high): Every Cloudflare example returns the proxy endpoint with port 443. Another port is not a TLS listener of the endpoint; the browser's connection fails and the request falls through.
- PAC-C029 [Prisma Access Explicit Proxy on a port other than 8080](https://findproxyforurl.net/rules/prisma-explicit-proxy-port/index.md) (high): The Explicit Proxy URL is <name>.proxy.prismaaccess.com on port 8080; the PAC file guidelines and every Palo Alto Networks example return "PROXY <name>.proxy.prismaaccess.com:8080". Another port is a dead entry.
- PAC-C030 [Prisma Access service domains not returned DIRECT](https://findproxyforurl.net/rules/prisma-service-domains-not-bypassed/index.md) (info): Palo Alto Networks requires the PAC to bypass the Authentication Cache Service (*.acs.prismaaccess.com) and, when GlobalProtect is used alongside Explicit Proxy, *.prismaaccess.com and *.gpcloudservice.com. Sending that traffic to the proxy breaks authentication or the agent connection.
- PAC-C031 [IP address written with leading zeros, in hex, as one number or in short form](https://findproxyforurl.net/rules/ip-address-unusual-form/index.md) (medium): Engines and people read 010.1.2.3, 0x0a.1.2.3, 167838211 or 10.1.2 differently. Even where the file works, such a form is confusing and leads to mistakes. Write IPv4 as four plain decimal numbers (10.1.2.3) and an IPv6 host in short form without brackets.
- PAC-D001 [PAC served over plain HTTP](https://findproxyforurl.net/rules/pac-over-plain-http/index.md) (high): The PAC is executable routing policy fetched on every browser start. Over plain HTTP a network attacker (hostile Wi-Fi, compromised router, ISP middlebox) can rewrite it and route all web traffic through a proxy of their choice.
- PAC-D002 [Content-Type is not application/x-ns-proxy-autoconfig](https://findproxyforurl.net/rules/wrong-content-type/index.md) (low): Chrome, Edge, Firefox and Windows load a PAC file whatever its Content-Type says. A wrong type does no harm on its own, but text/html or application/octet-stream often means the server answers with an error page or has no setting for the file.
- PAC-D003 [No Cache-Control header on the PAC response](https://findproxyforurl.net/rules/missing-cache-control/index.md) (medium): Without Cache-Control, proxies, CDNs and clients that keep the PAC file in an HTTP cache decide on their own how long to keep it. Chrome and Firefox are not affected, because they fetch the file past the HTTP cache. An explicit max-age of a day or less makes the window known.
- PAC-D004 [PAC marked no-cache / no-store / max-age=0](https://findproxyforurl.net/rules/cache-control-no-cache/index.md) (low): Forbidding caching does not make changes reach Chrome or Firefox faster, because they fetch the PAC file past the HTTP cache anyway. It makes proxies, CDNs and clients that use an HTTP cache fetch the file from the server every time, which adds load and makes the PAC server a dependency for them.
- PAC-D005 [PAC cached for more than a day](https://findproxyforurl.net/rules/cache-control-too-long/index.md) (low): A max-age of several days lets proxies, CDNs and clients that keep the PAC file in an HTTP cache use a wrong or outdated file for that long. Chrome and Firefox are not affected. Keep max-age at a day or less.
- PAC-D006 [Large PAC served without compression](https://findproxyforurl.net/rules/uncompressed-large-pac/index.md) (low): A PAC of tens of kilobytes is fetched by every client on every refresh. Text compresses well; serving it gzip-encoded to the clients that ask for compression cuts the transfer without touching the file.
- PAC-D007 [PAC distributed via WPAD DNS discovery](https://findproxyforurl.net/rules/wpad-dns-discovery/index.md) (medium): WPAD clients look up wpad through the DNS suffix search list, and Windows also tries parent domains (DNS devolution). If no internal record answers, a wpad name outside your organisation can supply the PAC. Own the name, block wpad queries beyond your zones, prefer explicit configuration.
- PAC-D008 [PAC URL distributed via DHCP option 252](https://findproxyforurl.net/rules/dhcp-option-252/index.md) (medium): DHCP answers are plaintext broadcasts with no authentication in practice. A rogue DHCP responder on the same segment can hand out its own PAC URL and take over routing for every client that trusts option 252. Switch-level DHCP snooping or explicit configuration closes the gap.
- PAC-D009 [PAC loaded from a file path or SMB share](https://findproxyforurl.net/rules/pac-from-file-share/index.md) (medium): A PAC on a file share is executable policy stored where many people can write. Access control on the share, not on the proxy team, now decides who controls routing. Chromium also no longer accepts file-scheme PAC URLs.
- PAC-D010 [PAC URL does not return 200](https://findproxyforurl.net/rules/http-error-status/index.md) (high): Clients use the PAC file only when the final answer is 200. Any other status (404, 500, even 203 or 204) means they have no script and run without one. Redirects are followed by browsers and by Windows, but the page they lead to must answer 200.
- PAC-D011 [PAC file is larger than 1 MiB](https://findproxyforurl.net/rules/pac-larger-than-1-mib/index.md) (high): Chrome, Edge and Windows do not load a PAC file larger than 1 MiB (1,048,576 bytes). The file is not shortened or partly used; the client behaves as if there were no PAC file at all.
- PAC-D012 [PAC URL asks for a login](https://findproxyforurl.net/rules/pac-needs-authentication/index.md) (high): The PAC URL answers with a login challenge (401 or 407, Basic, NTLM, Negotiate). Chrome, Edge and Windows do not log in to fetch a PAC file, so they run without one.
- PAC-D013 [PAC file is served as UTF-16](https://findproxyforurl.net/rules/pac-utf16-encoded/index.md) (high): The file the server sends is stored as UTF-16 (it starts with the bytes FF FE or FE FF). Windows and Firefox cannot read it, so they run without a PAC file; only Chromium-based browsers cope.
- PAC-D014 [Server compresses the PAC file although the client did not ask](https://findproxyforurl.net/rules/pac-compressed-unasked/index.md) (high): The server compresses the PAC file even for a request that did not ask for compression. Such a server compresses for every client, and Windows (WinHTTP) could not load a compressed PAC file in the lab.
- PAC-E001 [PAC file does not parse](https://findproxyforurl.net/rules/syntax-error/index.md) (critical): The file is not valid JavaScript. No engine can run it; every browser falls back to its no-PAC behaviour, which in practice is DIRECT.
- PAC-E002 [No FindProxyForURL function](https://findproxyforurl.net/rules/missing-findproxyforurl/index.md) (critical): The file parses but defines no function called exactly FindProxyForURL. Engines bind by that exact, case-sensitive name; nothing else is called.
- PAC-E003 [FindProxyForURL declared more than once](https://findproxyforurl.net/rules/duplicate-findproxyforurl/index.md) (high): Two or more function declarations named FindProxyForURL. JavaScript keeps the last one; the others are dead code that still looks authoritative to a reader.
- PAC-E004 [FindProxyForURL does not take exactly two parameters](https://findproxyforurl.net/rules/findproxyforurl-wrong-arity/index.md) (medium): Engines call FindProxyForURL(url, host). With one parameter the hostname is unavailable; with more than two the extra parameters are always undefined.
- PAC-E005 [Call to a function that is not defined](https://findproxyforurl.net/rules/unknown-function-call/index.md) (critical): The function name is neither a PAC helper, an ES5 global, nor defined in the file. The branch throws when reached and the engine treats the request as a script failure.
- PAC-E006 [Evaluation throws an exception](https://findproxyforurl.net/rules/runtime-exception/index.md) (high): A test evaluation ended with an uncaught exception instead of a return value. The engine treats this as a script failure for that request.
- PAC-E007 [Evaluation did not finish within the time limit](https://findproxyforurl.net/rules/evaluation-timeout/index.md) (critical): A test evaluation ran into the sandbox timeout. Real engines have no comparable guard; a loop that never ends hangs proxy resolution for the browser.
- PAC-E008 [Loop without a reachable exit](https://findproxyforurl.net/rules/potentially-infinite-loop/index.md) (high): A while/for/do loop whose condition is a constant truthy value and whose body contains no break, return or throw. It can never terminate.
- PAC-E009 [Assignment used as a condition](https://findproxyforurl.net/rules/assignment-in-condition/index.md) (high): A single = inside an if condition assigns instead of compares. The condition is then simply the assigned value, so the branch fires for every request.
- PAC-E010 [isInNet called with an invalid address, mask or argument count](https://findproxyforurl.net/rules/isinnet-invalid-arguments/index.md) (high): The network or mask literal is not a dotted-quad IPv4 address, the mask is not contiguous, or the call has fewer than three arguments. The comparison is then false for every host.
- PAC-E011 [Return value is not a valid proxy string](https://findproxyforurl.net/rules/invalid-return-value/index.md) (high): The function returns something that is not a string of semicolon-separated 'DIRECT' / 'PROXY host:port' / 'SOCKS host:port' entries (or an engine-specific extension). Engines drop what they cannot parse and typically end up DIRECT.
- PAC-E012 [Proxy port out of range or not numeric](https://findproxyforurl.net/rules/invalid-proxy-port/index.md) (high): A PROXY/SOCKS entry carries a port that is not an integer between 1 and 65535. Browsers discard the entry; when no other entry follows, traffic goes DIRECT.
- PAC-E013 [File saved as UTF-16 instead of UTF-8 or ASCII](https://findproxyforurl.net/rules/byte-order-mark/index.md) (medium): The file was saved as UTF-16 (Notepad's "Unicode" or Windows PowerShell output), not as UTF-8 or plain ASCII. Windows cannot load such a file, so Windows programs ignore it; in the checker it also shows up as a syntax error.
- PAC-E014 [Non-ASCII characters in code](https://findproxyforurl.net/rules/non-ascii-characters/index.md) (high): The file contains characters outside 7-bit ASCII in code position, typically smart quotes from a word processor or a stray emoji. Smart quotes are a syntax error; other characters are at best unnecessary.
- PAC-E015 [Zero-width or bidirectional control characters](https://findproxyforurl.net/rules/invisible-characters/index.md) (high): Zero-width spaces, joiners, bidi marks, no-break spaces or a mid-file BOM. They are invisible in editors but change what a string literal contains, so a pattern that looks right never matches.
- PAC-E016 [Statements after an unconditional return](https://findproxyforurl.net/rules/unreachable-code/index.md) (medium): Statements that follow a return in the same block are never executed. Rules placed there look active but have no effect.
- PAC-E017 [PAC helper called with the wrong number of arguments](https://findproxyforurl.net/rules/pac-function-wrong-arity/index.md) (high): A built-in PAC helper is called with too few or too many arguments. In the browsers missing arguments are undefined, which makes the helper return false or an unexpected value for every host. Windows (WinHTTP) raises an error for many such calls, which ends the script.
- PAC-E018 [Browser or Node.js objects used in the PAC](https://findproxyforurl.net/rules/browser-or-node-objects-in-pac/index.md) (high): A PAC file runs neither in a web page nor in Node.js. window, document, navigator, fetch, setTimeout, process, require and similar objects are not defined, so using them throws an error and the browser treats the file as broken.
- PAC-E019 [Unknown Zscaler PAC variable](https://findproxyforurl.net/rules/zscaler-unknown-pac-variable/index.md) (high): A Zscaler-hosted PAC file may contain variables such as ${GATEWAY} that the PAC server replaces before the browser sees the file. A misspelt or undocumented variable stays literal, the proxy entry becomes invalid and browsers skip it, which can mean a silent direct connection.
- PAC-K001 [ES2015 to ES2017 syntax (let, const, arrow functions, template literals)](https://findproxyforurl.net/rules/es2015-syntax/index.md) (medium): Chrome, Firefox and Windows accept ES2015 to ES2017 syntax such as let, const and arrow functions, but older engines (pactester builds up to 1.4, engines embedded in appliances and agents) fail to parse the whole file, and their traffic goes DIRECT.
- PAC-K002 [alert() used in the PAC](https://findproxyforurl.net/rules/alert-in-pac/index.md) (low): alert() is the PAC specification's debugging hook. Chromium records it internally, Firefox writes to its console and Windows accepts it without visible output, but engines without alert, such as older pactester builds, throw and abort the evaluation. It has no place in a deployed file.
- PAC-K003 [IPv6 extension functions (isInNetEx, dnsResolveEx, myIpAddressEx)](https://findproxyforurl.net/rules/ex-functions-not-portable/index.md) (medium): The Ex functions come from Microsoft's IPv6 extensions to the PAC format. Chromium and WinHTTP implement them; Firefox does not. On an engine without them the call throws and the request is treated as a script failure.
- PAC-K004 [FindProxyForURLEx entry point](https://findproxyforurl.net/rules/findproxyforurlex-only/index.md) (medium): FindProxyForURLEx is the PAC v2 entry point from Microsoft's IPv6 extensions. Chromium and Firefox ignore it and call FindProxyForURL. A file that relies on the Ex function alone has no effect in browsers.
- PAC-K005 [SOCKS keywords mean different versions on different engines](https://findproxyforurl.net/rules/socks-version-keyword/index.md) (medium): The PAC format defines only "SOCKS host:port" without a protocol version. Chromium treats plain SOCKS as SOCKS4, Firefox is reported to use SOCKS5, Windows misreads SOCKS4 and SOCKS5 entries, and .NET programs on Windows ignore SOCKS entries and connect directly.
- PAC-K006 [HTTPS proxy keyword without a PROXY fallback](https://findproxyforurl.net/rules/https-proxy-keyword-without-fallback/index.md) (medium): "HTTPS host:port" tells the browser to open TLS to the proxy itself. Chromium and Firefox support it; Windows passes the entry on, but older Windows programs cannot use it, and most on-premises proxies have no TLS listener. Without a PROXY fallback those clients end up without a working proxy.
- PAC-K007 [Time functions that answer differently per engine (weekdayRange, dateRange, timeRange)](https://findproxyforurl.net/rules/time-functions-usage/index.md) (medium): On Windows, dateRange and timeRange are always false and weekdayRange fails on day names that are not in upper case. A range that wraps around (FRI to MON, DEC to JAN, 22:00 to 06:00) is matched by Chrome, Edge and Firefox but never by pactester, and timeRange(22, 6) is never true anywhere.
- PAC-K008 [Mutable state outside FindProxyForURL](https://findproxyforurl.net/rules/module-scope-state/index.md) (low): A top-level variable that FindProxyForURL writes to (a cache, a counter, a "first call" flag) assumes one persistent JavaScript context. Engines may run several contexts or recreate them, so the state is unreliable and behaviour becomes non-reproducible.
- PAC-K009 [Case-sensitive host comparisons without lower-casing host](https://findproxyforurl.net/rules/host-not-lowercased/index.md) (low): Chrome, Edge and Firefox lower-case the hostname before calling the PAC. On Windows, programs that use WinHTTP (system services, BITS) pass it as typed, while WinINet, .NET and Java programs lower-case it. Lower-casing host once at the top of the function makes the file behave the same everywhere.
- PAC-K010 [ES2015+ library methods (startsWith, flat, replaceAll, globalThis)](https://findproxyforurl.net/rules/es2015-builtins/index.md) (medium): Unlike ES2015 syntax, newer library methods parse fine on an old engine and fail only at runtime with a TypeError for the request that reaches them. The branch then behaves like a script failure.
- PAC-K011 [Routing depends on Math.random or the clock](https://findproxyforurl.net/rules/nondeterministic-result/index.md) (low): Using Math.random() or the current time to pick a proxy produces different answers for identical requests. Load balancing done this way fragments connection pools and makes support cases impossible to reproduce.
- PAC-K012 [Engines return different results for the same URL](https://findproxyforurl.net/rules/engine-divergent-result/index.md) (info): The same test URL produced different proxy decisions under different engine profiles (for example because Chromium strips the path from https URLs, or because an engine lacks a helper). The PAC's behaviour depends on which client runs it.
- PAC-K013 [Routing decided by myIpAddress()](https://findproxyforurl.net/rules/myipaddress-usage/index.md) (medium): Each engine picks "the client's IP" by its own rule (browsers the route to the internet, Windows the adapter order, pactester the computer's name), so with several adapters or a VPN the answer differs and can change. Location-based routing keyed on it is unreliable.
- PAC-K014 [isInNet called with an IPv6 address](https://findproxyforurl.net/rules/isinnet-with-ipv6/index.md) (medium): isInNet is defined for dotted-quad IPv4 addresses and masks. An IPv6 network or mask makes the test false on every engine; the IPv6-capable isInNetEx exists only in some engines.
- PAC-K015 [Regular-expression syntax inside a shExpMatch pattern](https://findproxyforurl.net/rules/regex-syntax-in-shexpmatch/index.md) (medium): shExpMatch(host, "(www|mail).corp.example") works in Chromium, Firefox and pacparser only because their helper turns the glob into a JavaScript RegExp without escaping ( ) and |. That is an accident, not the PAC contract; Windows (WinHTTP) treats the characters literally and never matches.
- PAC-K016 [Zscaler gateway named directly instead of through ${GATEWAY}](https://findproxyforurl.net/rules/zscaler-literal-gateway-address/index.md) (low): Zscaler discourages hard-coded gateway addresses because they can change. The ${GATEWAY} variables are resolved per request by the PAC server to the closest healthy Public Service Edge; a literal gateway.<cloud>.net host or IP is static and skips that logic.
- PAC-K017 [ES2015+ syntax and the Zscaler Client Connector legacy PAC parser](https://findproxyforurl.net/rules/zscaler-client-connector-legacy-pac-parser/index.md) (medium): Zscaler Client Connector evaluates the App Profile and Forwarding Profile PAC files itself. Older versions offered a legacy parser next to the V8-based one; whether the legacy parser accepts ES2015 syntax is undocumented, so a modern-syntax PAC may fail on an old client while browsers run it.
- PAC-K018 [Legacy Skyhigh / McAfee cloud proxy domain](https://findproxyforurl.net/rules/skyhigh-legacy-proxy-domain/index.md) (low): The cloud proxy moved from mcafee-cloud.com (retired at the end of 2022) and saasprotection.com to wgcs.skyhigh.cloud. A PAC that still names the retired domain has no proxy; one that names the previous domain works today but should be migrated.
- PAC-K019 [IPv6 address in a PROXY statement for Prisma Access](https://findproxyforurl.net/rules/prisma-ipv6-proxy-address/index.md) (high): Palo Alto Networks' PAC file guidelines state that only IPv4 addresses are supported in PROXY statements. An IPv6 literal does not reach the Explicit Proxy.
- PAC-K020 [JavaScript syntax newer than ES2017 (?., ??, object spread)](https://findproxyforurl.net/rules/es2018-syntax/index.md) (high): Windows fails to load a PAC file that contains syntax newer than ES2017, such as ?., ??, object spread {...o}, BigInt literals or newer regular-expression forms. Every Windows program then ignores the file, while Chrome and Firefox run it without a complaint.
- PAC-K021 [Decision depends on the URL path or query](https://findproxyforurl.net/rules/url-path-decision/index.md) (info): The file chooses the route by the path or query of the URL. Chrome and Windows pass https URLs without path and query and Firefox passes no path at all, so such a test does not match there; Windows also reuses an earlier answer for the same host, even for http.
- PAC-K022 [console used in the PAC](https://findproxyforurl.net/rules/console-in-pac/index.md) (medium): console.log works in Chrome and in current pactester builds, but Firefox, Windows (WinHTTP) and older pactester builds do not define console. There the call throws an error and the request is handled as a script failure.
- PAC-P001 [DNS function on the path of every request](https://findproxyforurl.net/rules/dns-function-on-hot-path/index.md) (high): dnsResolve, isResolvable and isInNet on a hostname make the route depend on DNS. The engines cache answers, so only the first request to a name waits; when DNS does not answer, every request waits (about 12 s per call on Windows). Most PACs can decide on the hostname alone.
- PAC-P002 [isInNet called with a hostname](https://findproxyforurl.net/rules/isinnet-on-hostname/index.md) (medium): isInNet resolves its first argument when it is not an IP address. Unguarded, it makes every non-IP request depend on DNS. The first request to a name waits, every request waits when DNS does not answer, a failed lookup fails open, and only one of several addresses is checked.
- PAC-P003 [isResolvable used as a reachability test](https://findproxyforurl.net/rules/isresolvable-usage/index.md) (medium): isResolvable makes the route depend on DNS: the first request to a name waits, and every request waits for a timeout where DNS cannot be reached. It also answers another question than "can I reach this host directly"; resolvable hosts can be unreachable, and the reverse.
- PAC-P004 [dnsResolve called repeatedly for the same host](https://findproxyforurl.net/rules/dnsresolve-not-hoisted/index.md) (low): Repeated dnsResolve(host) calls for one name are usually answered from a cache, but Windows (WinHTTP) waits again on every call when DNS does not answer, pactester asks for every call, and in Chrome dnsResolve plus dnsResolveEx for one name are two lookups. Resolve once into a local variable.
- PAC-P005 [DNS-dependent rule placed before string rules](https://findproxyforurl.net/rules/expensive-before-cheap/index.md) (low): Rules execute in source order and the first match returns. When a DNS-dependent rule precedes string rules, requests that a later cheap rule would have decided still depend on DNS. The first request to each name waits for the lookup, and every request waits when DNS does not answer.
- PAC-P006 [PAC file is large](https://findproxyforurl.net/rules/large-pac-file/index.md) (low): Above roughly 50 KB a PAC starts to cost measurable time per connection; above 1 MB engines refuse to load it. Long host lists usually belong on the proxy, not in the file every client downloads and executes.
- PAC-P007 [Many conditions and branches](https://findproxyforurl.net/rules/high-complexity/index.md) (info): A PAC with dozens of conditions is slow to read, slow to review and slow to run for default-route traffic. Complexity metrics are reported so the trend can be watched; grouping rules by domain and helper functions keep the file maintainable.
- PAC-P008 [Deeply nested conditions](https://findproxyforurl.net/rules/deep-nesting/index.md) (info): if blocks nested more than two or three levels deep hide which rule decides. A flat sequence of if (...) return ...; statements gives first-match-wins semantics without nesting.
- PAC-X001 [No unconditional return at the end of FindProxyForURL](https://findproxyforurl.net/rules/no-default-return/index.md) (critical): Some code path reaches the end of FindProxyForURL without a return. The function then returns undefined, and Chromium, Firefox and WinHTTP all connect directly. Traffic silently bypasses the proxy.
- PAC-X002 [Trailing * in a host pattern matches attacker-controlled suffixes](https://findproxyforurl.net/rules/shexpmatch-trailing-asterisk/index.md) (high): shExpMatch(host, "example.com*") matches example.com.evil.test and example.comms.test. Anyone who controls a domain can append the trusted name as a subdomain label and inherit the rule.
- PAC-X003 [dnsDomainIs pattern without a leading dot matches look-alike domains](https://findproxyforurl.net/rules/dnsdomainis-without-leading-dot/index.md) (high): dnsDomainIs is a plain string-suffix test. "corp.example" matches www.corp.example, corp.example and also notcorp.example. Only ".corp.example" restricts the match to subdomains.
- PAC-X004 [Leading * without a dot matches look-alike domains](https://findproxyforurl.net/rules/shexpmatch-leading-asterisk-without-dot/index.md) (high): shExpMatch(host, "*corp.example") matches badcorp.example as well as www.corp.example. The safe form is "*.corp.example", where the dot forces a label boundary.
- PAC-X005 [Pattern matches an entire top-level domain](https://findproxyforurl.net/rules/tld-only-pattern/index.md) (high): shExpMatch(host, "*.de") or dnsDomainIs(host, ".com") routes a whole country or generic TLD. In the usual "proxy everything, except..." PAC this bypasses inspection for millions of unrelated sites.
- PAC-X006 [IP range matched as a text prefix](https://findproxyforurl.net/rules/rfc1918-string-pattern/index.md) (high): shExpMatch(host, "127.*") or "10.*" compares characters, not addresses. On its own it matches the hostname 127.foo.evil.test and, for "172.*", every public 172.x address. Use isInNet with a mask, or confirm the text match with isInNet on the same host in the same && condition.
- PAC-X007 [String prefix used to match an IP range](https://findproxyforurl.net/rules/substring-ip-prefix-match/index.md) (high): host.substring(0, 8) == "10.1.2.9" matches 10.1.2.99 and the hostname 10.1.2.9.evil.test. Prefix arithmetic on strings is not subnet arithmetic.
- PAC-X008 [Port matched as a substring of the URL](https://findproxyforurl.net/rules/url-substring-port-pattern/index.md) (high): shExpMatch(url, "*:1080*") was meant to match port 1080 but also matches http://www.example.com/page?id=1080. A bypass is one query parameter away.
- PAC-X009 [Pattern with leading and trailing * is a substring match](https://findproxyforurl.net/rules/unanchored-substring-pattern/index.md) (high): shExpMatch(host, "*example.com*") or shExpMatch(url, "*abc*") is true for any string that contains the characters anywhere. Over url this includes query strings an attacker controls; over host it includes look-alike domains.
- PAC-X010 [dnsResolve result compared with a literal address](https://findproxyforurl.net/rules/dnsresolve-compared-to-literal/index.md) (medium): if (dnsResolve(host) == "10.1.2.3") depends on the resolver answering, answering fast and answering with exactly that record. Any failure makes the condition false and the request takes the default route unnoticed.
- PAC-X011 [Exceptions are caught and turned into DIRECT](https://findproxyforurl.net/rules/fail-open-catch-direct/index.md) (high): A try/catch whose catch returns "DIRECT" converts every runtime problem (DNS failure, typo, engine quirk) into a proxy bypass. Errors should fail closed, towards the proxy.
- PAC-X012 [Wildcard inside a domain label](https://findproxyforurl.net/rules/shexpmatch-middle-asterisk/index.md) (medium): shExpMatch(host, "corp*.example") matches corp.example and corp-cdn.example but also corpevil.example. A wildcard inside a label spans arbitrary registrable names.
- PAC-X013 [PROXY entry without a port](https://findproxyforurl.net/rules/proxy-without-port/index.md) (medium): "PROXY proxy.corp.example" names no port. Chromium and Windows (WinHTTP) assume 80; Firefox is reported to reject the entry, and a rejected sole entry means a direct connection. Always write host:port.
- PAC-X014 [DIRECT as fallback after a proxy](https://findproxyforurl.net/rules/direct-fallback-in-proxy-list/index.md) (info): "PROXY proxy.corp.example:8080; DIRECT" keeps users online when the proxy is down, at the price of uninspected traffic during the outage. Make sure that trade-off is intended.
- PAC-X015 [eval or Function constructor in the PAC](https://findproxyforurl.net/rules/dynamic-code-evaluation/index.md) (medium): eval() or new Function() builds code from strings at runtime. There is no legitimate need for it in a PAC; it hides logic from review and from static analysis.
