Script Integrity Monitoring
Violation reports tell you what your policy would block. Script integrity reports tell you what genuinely ran: for every external script the browser fetched and executed, its URL, the origin that served it, the page it ran on, and a SHA-256 hash of its contents. When a script’s code changes, its hash changes, and the same URL starts appearing under a second hash.
This is the signal behind the Scripts section of the dashboard, and the one teams reach for when they need an inventory of the JavaScript on a payment page — see CSP reporting and PCI DSS 4.0 for how it maps to requirements 6.4.3 and 11.6.1.
Turning it on
Section titled “Turning it on”Two headers have to agree. Add the 'report-sha256' keyword to your
script-src directive, and declare the endpoint with Reporting-Endpoints and
report-to:
Reporting-Endpoints: csp-endpoint="https://your-ingest-code.ingest.us.headerhawk.com/r"Content-Security-Policy-Report-Only: script-src 'self' https://cdn.example.com 'report-sha256'; report-to csp-endpointYour ingest code is the first part of the host, and the whole endpoint URL is on the site’s setup panel, under Settings → Sites in the dashboard.
Two details here produce a policy that looks correct and reports nothing:
report-uricannot deliver a hash report. A hash report is a Reporting API report type.report-uripredates report types and carries CSP violation reports only, so it has no way to carry this one. UseReporting-Endpointswithreport-to, as above. You can keep areport-urialongside it for violation reports in older browsers.- The quotes matter.
'report-sha256'is a keyword source expression and must be quoted and placed insidescript-src. Barereport-sha256is parsed as a hostname and does nothing.
Report-only mode is enough. Hash reporting does not depend on the policy being enforced, so you can collect an inventory without any risk of breaking the page.
What arrives, and what does not
Section titled “What arrives, and what does not”Browser support is narrow
Section titled “Browser support is narrow”Chrome and Edge implement 'report-sha256', from Chromium 133 onwards. WebKit
support is in progress, so Safari does not send them yet, and Firefox does not
implement it. Whatever share of your traffic is not recent Chrome or Edge
contributes nothing.
The feature is also new enough that behaviour varies between builds. In September 2026 an early check against Chrome 152 on our deployed test site received no hash reports at all, while violation reports from the same page arrived normally. Later the same month, Chromium 145 and Chrome 153 sent one hash report for every script they fetched and executed, on every page load. Confirm what your visitors’ browsers actually do before relying on it.
A cached script produces no hash
Section titled “A cached script produces no hash”The browser computes the hash when it fetches and executes a script. A script served from cache is never fetched, so no hash is generated, however correct your policy is.
The practical effects:
- A well-cached page reports far fewer hashes than it has scripts.
- Returning visitors contribute almost none.
- On a normal reload during testing you will usually see nothing. A hard refresh (shift+reload) forces the fetch and removes caching as an explanation — though it is not a guarantee a report will follow, since support is still narrow.
Inline scripts never appear
Section titled “Inline scripts never appear”Hash reports describe subresources the browser fetched. A script written inline
in the page is not a fetch, so it does not appear in the Scripts views or the
inventory at all. We checked in Chromium 145 and Chrome 153 in September 2026:
an inline script, allowed by a nonce under a policy with 'report-sha256',
sent nothing, while the external and dynamically inserted scripts on the same
page each sent a report. Report-only violation reporting still surfaces inline
scripts, with a snippet of their content when your policy includes
'report-sample'.
Repeat sightings are sampled
Section titled “Repeat sightings are sampled”The first time your site reports a given script URL with a given hash, that report skips sampling. After that, repeat reports of the same script and hash are sampled at the site’s script hash sample rate, which defaults to 10%. Switching script hashes off for the site is the exception: it turns hash collection off altogether, first sightings included.
That first-sighting pass is a priority, not a guarantee. Two limits still apply after it, and either can hold a genuinely new hash back until the next sighting:
- your tenant’s monthly report quota. A report is a report: each hash report that gets through counts as one against the same quota your violation reports draw on, and a tenant already over its monthly limit stops receiving hashes; and
- a daily per-site ceiling on script hash events, set at a thirtieth of your plan’s hard limit — 1,666 a day per site on Free, 33,333 on Team. It is an anti-flood guard, not a hash allowance: it bounds how fast reports can arrive, while the monthly quota bounds how many. It sits far above what a real site produces — a page has tens to hundreds of distinct scripts, not thousands a day.
Reports dropped before that point cost you nothing. A hash dropped by sampling,
by the daily ceiling, or because its documentURL does not match the site’s
domain is never counted.
So treat counts as a sample. Read them as “this script was seen”, not as “this script was loaded exactly N times”.
Choosing a sample rate
Section titled “Choosing a sample rate”The sample rate is per site, under Settings → Sites in the edit dialog’s Report types section: a switch and a 1–100% slider on the Script hash row. A change reaches ingestion within a minute.
| Rate | When it fits |
|---|---|
| 10% (default) | Ongoing monitoring. First sightings still take priority; you give up precision on repeat counts, which is the number you should trust least anyway. |
| Higher | A low-traffic site, or a short investigation where you want repeat sightings to show up promptly. More repeat sightings get through, so more of your monthly report quota goes on hashes; the daily per-site ceiling still applies too, so a busy site at a high rate can reach it. |
| Off | The switch, not a rate. No hash reports are recorded for the site — repeat sightings and first sightings alike — and none count against your quota. Use it on a site where you do not want a script inventory kept at all. |
Raising the rate does not widen coverage — it does not help with cached scripts, unsupported browsers, or inline scripts. It only changes how many repeat sightings of an already-known hash get through, and each one that does counts against your monthly report quota. On a busy site that is the setting to watch: the usage meter in the sidebar, and the fuller breakdown under Settings → Billing, both include hash reports, and the breakdown says how many of the total they were. On Free, which has no Scripts view, the sidebar shows the period’s hash report count where the Scripts entry would be.
There are two ways to stop hash collection, and they act in different places.
Switching script hashes off stops HeaderHawk recording the reports; the browser
still sends them, and they are discarded on arrival. Removing 'report-sha256'
from your policy stops the browser sending them at all, which is the one to
reach for if the traffic itself is what you want to be rid of.
The Scripts page shows the site’s current rate, or that collection is off, above the results, so a view that looks sparse can be checked against its own configuration.
Reading the dashboard
Section titled “Reading the dashboard”The Scripts page offers 24-hour, 7-day and 30-day windows only. Shorter windows are not useful here: hashes arrive slowly by construction.
It has three tabs: Payment pages, the authorization inventory described below; All scripts; and Integrity, for Subresource Integrity coverage. A script is one row in each list: its file name, with the host and the library its bytes were identified as under it, then its risk and when it was last seen. Everything else (the full URL, every hash, who saw each one and when) is in the drawer a row opens.
Risk is one badge, the worst of two findings: the advisories published
against the script’s version, by severity, and No SRI, a browser loading it
without an integrity attribute. A critical or high advisory outranks No SRI,
and No SRI outranks a medium or low one; hovering the badge lists both. An
empty cell means neither was found. A script that could not be identified says
Not assessed rather than nothing, because there was no version to look an
advisory up for; where it shows No SRI instead, hovering the badge says so.
All scripts
Section titled “All scripts”Every distinct script URL reported in the window, with how many pages it was seen on and when it was last seen. This is the inventory view. The same URL under two hashes is two rows, each showing its hash: that script’s contents changed during the window — a release, a vendor pushing a new build behind a stable URL, or something you did not expect.
Three filter chips narrow the list, each with its count: Unprotected, Unrecognised and, on Professional and above, Known vulnerabilities. They combine, so Unprotected and Unrecognised together lists the scripts no browser is checking that nobody can put a name to.
Group by shows the same scripts counted another way:
- Origin: every hostname serving scripts to your pages, with how many
distinct scripts and reports came from each. Origins are recorded as the bare
hostname, so scheme and port are not part of the grouping:
https://cdn.example.com/a.jsandhttp://cdn.example.com:8443/a.jsare one row; the drawer keeps the full URL. Start here: the list is short enough to read in full, and an origin you do not recognise is the fastest way to find a script you did not know about. A tag manager that loads three more tags from three more vendors shows up as three extra origins. - Page: which of your pages loaded scripts, how many distinct scripts each one loaded, and when. Use it to answer “what runs on the checkout page” rather than “where does this script run”.
Plan availability
Section titled “Plan availability”The Scripts section appears in the dashboard on Team and above; grouping by page, the Payment pages view, script authorization, script alerts and the inventory export on Professional and above. On the free plan there is no Scripts item in the navigation at all. The API refuses the same requests the dashboard does not offer.
A plan change never takes your decisions away: after a downgrade, the payment pages view, every script’s decision history and the export stay readable. Making new decisions and sending script alerts stop.
Collection itself is not plan-gated — a site sending hash reports on any plan is still subject to the sample rate, the monthly quota, and the daily ceiling described above.
Authorizing scripts on payment pages
Section titled “Authorizing scripts on payment pages”PCI DSS 6.4.3 asks that every script on a payment page is authorized, that its integrity is assured, and that an inventory with a written justification for each one is kept. On the Professional plan and above, the Scripts page’s Payment pages view is that inventory. It opens once a site has a payment page (Payment Pages).
- A script is its URL. The query string and fragment are dropped, so
app.js?v=2andapp.js?v=3are one script. Each distinct hash it has been reported with is a version of it, listed under the script. - The review queue lists the scripts reported on, or found by the daily scan of, your payment pages that nobody has decided about yet, oldest first.
- Decision is Unreviewed, Authorized, Pinned (authorized for its pinned hashes only) or Rejected. The drawer says, for each hash, whether browsers reported it, the daily scan found it, or both.
- Authorize or reject, with a written justification, which is required.
An authorization also says what it covers:
- Only the pinned hashes: you choose which of the versions seen so far are acceptable, and a new one alerts. Use it for a script you host or a vendor that versions its URLs.
- Any content from this URL: for a vendor that updates its script in place, such as Stripe.js or a tag manager. New versions are recorded and shown, and alert nobody; the justification is where you say why that is acceptable.
- Every decision is kept. Who decided, when, what and why, in the order they were made. A decision cannot be edited or deleted, only followed by another one; decisions go only if the site does.
- Members, admins and owners can decide; viewers can read everything.
The export (Export CSV) is one row per script and payment page it ran on, with its status, integrity mode, pinned hashes, the hashes seen, the justification, who decided and when, when it was first and last seen, what saw it (browsers, the scan, or both) and when a scan last found it. PCI evidence from the inventory explains what it does and does not show.
What the inventory covers
Section titled “What the inventory covers”The inventory is what browsers reported and what the daily scan found, not proof that nothing else ran. Everything under What arrives, and what does not applies to the browser half of it: a cached script, or one loaded cross-origin without CORS, is reported less or not at all. The scan, below, closes those gaps for the scripts a page’s HTML names, but not for a script another script adds. The view’s (?) links here, and the top of every export says the same.
What the daily scan adds
Section titled “What the daily scan adds”On the Professional plan and above, each payment page is
scanned daily, and
the scan fetches every script the page’s HTML names, up to 25, and hashes what
each one served. Its hashes are written exactly as a browser’s 'report-sha256'
is, so a version seen both ways is one version with both sources. It closes
three of the gaps above for those scripts:
- Caching. The scan fetches every script, whether or not your visitors have it cached.
- CORS. The scan is not a browser page, so a script loaded cross-origin without CORS, which browsers report with no hash, gets a real one. That hash can be pinned.
- Traffic. It runs every day, whether or not anyone visited the page.
A script the scan finds first is identified on that scan, as a browser’s first report of it would be, so its library name and its known vulnerabilities do not wait for a browser.
What it does not change: it reads the HTML and runs no JavaScript, so a script
that another script adds while the page runs, such as the tags a tag manager
loads, is seen only when a browser reports it. Each scan’s list of scripts,
with each one’s hash or the reason it has none, its integrity attribute and
whether your page could integrity-check it, is on the page’s scan history
under Headers.
A policy from your decisions
Section titled “A policy from your decisions”The decisions are a written allowlist. The Policy view on Payment
pages turns them into the browser mechanism that enforces it: a
Content-Security-Policy for your payment pages whose script-src is your
decisions.
| Your decision | In script-src |
|---|---|
| Authorized, only the pinned hashes | Each pinned hash, such as 'sha256-…' |
| Authorized, any content from this URL | The URL, such as https://js.stripe.com/v3/ |
| Authorized and pinned, but browsers saw no hash | The URL, with a warning |
| Rejected, or no decision yet | Nothing: a browser blocks it once you enforce |
- Only
script-srccomes from your decisions (andscript-src-elem, if your policy has one). Every other directive is your own policy’s: your proposed policy if you have one, else the policy your payment pages’ reports quote, else the latest scan’s header, elsedefault-src 'self'. The view says which.'self', and your nonce,'strict-dynamic'or inline-script hashes, are kept as they are. - It is a second header, for your payment pages only. Your decisions cover only the scripts seen there, so served across the site it would block every script that runs only on your other pages. Serve it on the paths the view lists. In report-only it runs beside your site’s own policy; enforced, it takes that policy’s place on those paths, because a browser enforces every policy it is sent. Serving a header on some paths shows how.
- Report-only first. The view hands out
Content-Security-Policy-Report-Only, reporting to your site’s own endpoint, and links to thescript-srcviolations on your payment pages. Switch to the enforcing header once it reports only what you rejected. The view says when your payment pages first served it, in report-only and enforcing, from the policy their reports quote or the daily scan’s header. - A pinned script needs its
integrityattribute. Browsers allow a script file by its hash only when its<script>tag carries anintegrityattribute naming that hash, and every hash in the attribute must be in the policy. The view gives the tag for each pinned script. A script another script adds cannot carry one unless that loader sets it, so authorize such a script for any content instead. - A URL is looser than a hash. A URL allows whatever is served there, and a browser stops checking the path after a redirect. A pinned script is therefore allowed by its hash alone, never by its URL as well.
- Older browsers. Chrome before 59, Safari before 15.6 and Firefox before 116 (Firefox ESR 115 among them) do not apply a hash to a script file, and block a pinned script once the policy is enforced. Report-only shows how many of your visitors that is. We measured current Chromium, Firefox and Safari (WebKit) before relying on it.
- When it warns. The view also warns when
'unsafe-inline'would stop working (browsers ignore it once a hash or nonce is present, so your inline scripts would need one), when'strict-dynamic'makes browsers ignore the URLs in it, and when a rejected or pinned script is on your own origin, which'self'allows whatever it contains. - Your site-wide policy is unchanged. A host your proposed policy keeps may serve a script you rejected on a payment page. The site-wide policy still allows it on your other pages; this header blocks it on your payment pages. Neither decision changes the other.
On the onboarding ladder this is the payment policy step, done once a payment page reports against it enforced.
Script alerts
Section titled “Script alerts”Five alert types about payment pages, on the Professional plan and above:
| Alert | When |
|---|---|
| New script on a payment page | A script your site has never reported before runs on one of its payment pages |
| Pinned script changed | A script authorized with pinned hashes runs on a payment page with a hash not pinned |
| Rejected script seen again | A script you rejected runs on a payment page after the rejection (at most once a day) |
| Script gone from a payment page | The daily scan no longer finds a script it had found on the page (below) |
| Script moved to another origin | A script left the page as a file with the same name appeared there from somewhere else |
All five are sent immediately; a gone script can also go in a daily or weekly digest.
Each alert says what raised it: browsers on two networks, or HeaderHawk’s daily
scan. A webhook carries the same as sightings.source.
Add them to a rule on the Alerts page (How Alerting Works). What they wait for, and why:
- Reports from at least two different networks, or the daily scan. Your ingest code is public, so anyone can send a report naming any script. An alert waits until browsers on two different networks have reported the script on a payment page, within a day of its first report. HeaderHawk keeps no address to do this: ingestion reduces the sender’s network to one of 256 values and keeps only that. On a quiet checkout this can take a while, since repeat reports are sampled; raising the site’s sample rate shortens it. The daily scan of a payment page needs no such wait: HeaderHawk fetched the script itself, so nobody could have forged it, and a script the scan finds alerts on that scan. A report that is still waiting for a second network when the scan finds the same script and hash alerts then, with the reports counted so far.
- A day to learn. A site’s first day of script reports alerts nobody about new scripts: everything is new then. In the same way, a payment page’s first scan to fetch its scripts is its baseline, and records them without raising a new-script alert.
- Five an hour. A site raises at most five script alerts in an hour. The sixth is one message saying the rest of the hour’s are held back, which is what a burst of fabricated scripts, or a deployment that adds many at once, turns into. The review queue still lists every one.
- Payment pages only. A new script seen only on other pages is listed in the inventory and alerts nobody, whatever a rule’s page scope says.
- Deciding closes it. If you authorize or reject a script while its alert is still gathering reports, the alert is dropped: you have already looked.
Scripts that leave a page
Section titled “Scripts that leave a page”PCI DSS 11.6.1 asks for alerts on changes, additions and deletions. A script disappearing from a payment page matters both ways: a skimmer that swaps a vendor’s tag for its own leaves the original missing, and a vendor removed without anyone deciding to is a change an assessor expects to have been noticed.
These two alerts come from the daily scan alone, never from browsers going
quiet. A script that stops being reported may only be cached, sampled away, or
on a page nobody visited that day; the scan reads the page’s HTML every day and
knows which <script src> tags are there. A script that only ever runs because
another script added it is never in the scan’s list, so it can never be “gone”
either.
- Gone means the scan found the script on the page in 3 scans in a row, and has now not found it in 2 in a row. A script seen once and never again was never established, and one scan catching a page mid-deploy pages nobody. Both numbers are chosen, not measured. With daily scans, a removal is reported within two days.
- Only scans that loaded the page count. A page that answered with an error, even one with a 404 page that rendered, drops all its scripts at once and raises nothing here; a page that could not be scanned raises Page scan failing instead. A page that now redirects somewhere else, such as a login page, is treated as a different page rather than one with fewer scripts, and so is one that no longer carries any of the scripts it had, such as a challenge or maintenance page answered with a 200. The cost: a page’s last remaining script leaving is not reported as gone. Scans more than a week apart are not “in a row”, and a page with more script tags than a scan records (100) is not judged.
- Once per disappearance. A script that comes back and stays for three scans can alert again if it goes again.
- Removed on purpose? Reject the script with a note saying so. A rejected script’s absence never alerts, and if it ever comes back you hear about it as a rejected script seen again.
- Moved is a guess, and the alert says so. When a script goes missing and a
file with the same name appears on the same page from a different
origin, in the same scan or the next, the two are paired:
cdn-a.example/checkout.jsnow loading fromcdn-b.exampleis one alert naming both, which you can judge at a glance and HeaderHawk cannot. Build hashes in a file name are set aside (checkout-5f3a2b1c.jspairs withcheckout-9d8e7f60.js); a file name that is only a hash names nothing, and is never paired. A paired move replaces the new URL’s New script alert, and the old URL is not reported as gone. If more than one file could pair, none is; you get the separate alerts instead. No move is raised for a new URL someone has already authorized or rejected. - A new build of your own file is not a disappearance. The same path on
your own origin with a new hash in its name (
index-a1b2c3d4.jsbecomingindex-e5f6a7b8.js) is a release. The new file still raises New script if the inventory has never had it. - The inventory keeps it. On the payment pages view, a script whose pages’
latest scans no longer find it is marked Missing, with the date it was
last found, rather than dropped from the list. It is marked after one scan
misses it; the alert waits for two. The export dates it per page in its
Gone from page (last found)column.
Subresource Integrity coverage
Section titled “Subresource Integrity coverage”A hash report tells you what ran. It does not tell you whether the browser was
checking what ran — that is Subresource Integrity, the integrity attribute
on a <script> tag, and it is the half of PCI DSS 6.4.3 that asks for “the
integrity of each script” rather than a list of them.
Integrity-Policy-Report-Only measures it. It asks the browser to report every
script it loads without integrity metadata, and nothing breaks while it is
report-only:
Reporting-Endpoints: headerhawk="https://your-ingest-code.ingest.us.headerhawk.com/r"Integrity-Policy-Report-Only: blocked-destinations=(script), endpoints=(headerhawk)The dashboard takes the Scripts views’ site and date range, reads those
reports, and gives every script in the range one of three states. All scripts
marks an unprotected one No SRI in its Risk column and has an
Unprotected chip, and the
Integrity tab (Scripts › Integrity) is where the work happens: the counts,
the header to deploy, every unprotected script with the integrity attribute
to paste, and how the count has moved over the last 30 days. It is a to-do
list that should shrink.
| State | What it means |
|---|---|
| Unprotected | A browser reported loading this script with no integrity metadata. Evidence. |
| Protected | This site reported integrity violations in the range, and never named this script. |
| Unknown | Nothing told us either way, because no integrity report reached us for this site. |
It is a Chromium measurement, like the hashes
Section titled “It is a Chromium measurement, like the hashes”Integrity Policy is implemented by Chromium, so it measures the share of your traffic on Chrome and Edge. Safari and Firefox visitors send nothing, and their absence is not coverage. Everything the sections above say about narrow browser support applies here unchanged.
Scripts that are not in the inventory
Section titled “Scripts that are not in the inventory”A script an integrity report names but no hash report ever did appears in the list marked Not in the inventory. That is not an error: a script served from cache for every visitor, or loaded cross-origin without CORS, reports a hash rarely or never, while its integrity report arrives on the first load. It is one of the few places a script the hash stream misses shows itself, so it is listed rather than dropped.
The attribute to paste
Section titled “The attribute to paste”For an unprotected script browsers reported with exactly one hash in the range, the Integrity tab offers the attribute that fixes it:
<script src="https://cdn.example.com/pay.js" integrity="sha256-…" crossorigin="anonymous"></script>It is built from the one version of the script visitors ran, so it is offered
only where there was one. A script reported with several hashes in the range
changes content, and any single attribute would block the other versions and
break on its next change; the tab says so and opens the script instead, where
you can pin the versions you trust or authorize it to run any content. A
script loaded cross-origin without CORS has no hash to offer, and needs CORS
for an integrity check anyway: add crossorigin="anonymous" and have its
server send Access-Control-Allow-Origin.
The trend, and enforcing
Section titled “The trend, and enforcing”The Integrity tab draws how many different scripts were reported unprotected each day over the last 30 days. A falling line is scripts gaining an integrity check. A line at zero is not the same thing: a day nothing reported reads zero whether every script was protected or the header was not being sent.
Coverage is part of the script inventory, so it is on Team and above, with the same evidence rule after a downgrade.
Naming the library behind a hash
Section titled “Naming the library behind a hash”A hash tells you the bytes changed. It does not tell you what the bytes are —
and “what is this script?” is the first question anyone has about a third-party
URL. The inventory answers it where it can: jquery 3.7.1 ·
dist/jquery.min.js, with the hash still beside it.
The answer rests on one fact. jsDelivr’s data API publishes a base64 SHA-256
for every file of every npm package version it serves, and it is byte-identical
to what a browser reports under 'report-sha256':
$ curl -s https://data.jsdelivr.com/v1/packages/npm/jquery@3.7.1... "name": "jquery.min.js", "hash": "/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" ...So a name is a hash matching a published file exactly. It does not rest on
the URL, the file name, a version string in a path, or anything your site told
us. That is the whole point: a file called jquery-3.7.1.min.js proves nothing
about its contents, and a hash proves everything about them.
Every script list names the library under each script’s file name, and All scripts has an Unrecognised chip, so a review can start with the scripts nobody can put a name to.
| State | What it means |
|---|---|
| jquery 3.7.1 | The hash matches a file that package version publishes. The name is the match. |
| Unrecognised | No package we index contains these bytes. A prompt to look, never a finding. |
| Cannot be identified | The browser sent no bytes, because the script was loaded cross-origin without CORS. |
| Name mismatch | The bytes match a published package, and the URL names a different one. |
Unrecognised is the normal answer for your own code
Section titled “Unrecognised is the normal answer for your own code”Your build output is in no public registry and never will be, so a first-party bundle reads unrecognised for ever. That is not a gap in your security and it is not a gap in ours — it is what the word means. Nothing alerts on it.
Two other honest reasons for it: we index the most-requested npm packages rather than all of npm, and a private or self-hosted library was never published anywhere we can read.
“Cannot be identified” is the opposite of “unrecognised”
Section titled ““Cannot be identified” is the opposite of “unrecognised””They read alike and mean opposite things. Unrecognised means we looked at
the bytes and found no match. Cannot be identified means there were no bytes
to look at: a cross-origin script loaded without CORS is reported with an empty
hash, so there is nothing to match and never will be. The fix is the same one
that gives you a hash at all — crossorigin="anonymous" on the tag, and an
Access-Control-Allow-Origin header from whoever serves it.
A name mismatch is a question
Section titled “A name mismatch is a question”When a script’s URL names a package and version, and the bytes turn out to be a different one, the script says so and asks about it rather than accusing anything:
Is this a patched build of jquery 3.7.2? The URL says jquery 3.7.2. These bytes are exactly jquery 3.7.1.
Both readings are common. A build with a security patch backported, served from your own CDN under the upstream name, looks exactly like this — and so does a copy nobody has updated in two years. Knowing which is the point.
It is deliberately not an alert. It is raised only where both sides state a
version cleanly, the version is always compared, and the package name is
only compared where the URL names npm itself (/npm/jquery@3.7.1/…) — a cdnjs
library name and an npm package name are different namespaces, and comparing
font-awesome with @fortawesome/fontawesome-free would report every such
pair as a mismatch.
When a name appears
Section titled “When a name appears”A hash is looked up once, when it is first seen on a script, and the answer is kept. It is never overwritten: an identity is a property of the bytes, and the bytes are the key. First seen means by whichever comes first, a browser’s report or a payment page’s daily scan, so a script the scan finds before any browser reports it is named on that scan.
Two things follow. A hash whose package was not yet indexed when it arrived is
picked up by a daily sweep, which works through the whole backlog and then
cycles, rather than staying nameless. And where the same bytes appear in more
than one release — a dist/ file unchanged between two patch versions — the
earliest release we hold is the one named. Read that version as “these
bytes have been the same at least since”, not as which release your script came
from: it is a lower bound, which is why nothing compares it against your URL.
Identification is part of the script inventory, so it is on Team and above, with the same evidence rule after a downgrade.
Known vulnerabilities
Section titled “Known vulnerabilities”On Professional and above, a script named as a library version is checked
against the advisories published for that version. They come from
OSV, which gathers the GitHub Advisory Database — the data
behind npm audit — with other sources, and each is shown with its severity,
its identifier (a CVE where one exists), the release that fixes it and a link
to the source. Each script list puts the worst severity in its Risk column, All
scripts filters to the affected ones, and the payment-page CSV export carries the advisory state, the ids, the
worst severity and the fixing releases beside each script.
The check reads the version from the bytes browsers executed, not from a lockfile, so it reaches the tag manager’s script, a vendor’s widget and the CDN copy of a library that appear in nobody’s dependency list.
An advisory is about the version, not your page
Section titled “An advisory is about the version, not your page”A flag says a published advisory names the version these bytes are. It does not say the vulnerable function is called on your page, or reachable from anything a visitor can do there — that is a question only your own code can answer. Read it as “this version has a published problem; decide whether it applies to how you use it.”
When it is checked
Section titled “When it is checked”A version is checked when a script is first identified as it, and every version in any inventory is checked again daily, so an advisory published today reaches a script that has been running for months. A check stands for 20 hours, so a second site running a version checked this morning reuses the answer.
A high or critical advisory raises a script.vulnerable alert, once
per advisory and version however many sites and scripts run it, delivered
immediately or in a digest like any other alert. Lower severities are shown on
the script and never alerted. Unlike the payment-page script alerts, it is not
limited to payment pages, so a rule scoped to payment pages does not hear it.
Every state, and why only one is a finding
Section titled “Every state, and why only one is a finding”- Affected — at least one advisory names the version. The badge shows the worst severity and how many.
- None known — the version was checked and nothing is published against it. That is not the same as safe: advisories are only as complete as their sources.
- Checking — the script is identified and its version has not been checked yet, usually for a few minutes.
- Not assessed — the script could not be identified, so there is no version to look up. This is most first-party code and always will be, and it is never shown as clean.
Advisories cover npm packages only, because identification does.
Verified copies of payment-page scripts
Section titled “Verified copies of payment-page scripts”On the Professional plan and above, HeaderHawk keeps a copy of each new version of a script on a site with payment pages, and keeps it only if it can prove the copy is the file that ran. When a version first appears, from a browser’s report or the daily scan, HeaderHawk fetches the script’s URL once, the way the daily scan does, and hashes what comes back. If the SHA-256 equals the hash that was reported, the file is kept; if not, nothing is. Anyone can download a URL and save the result. Only a copy whose digest a real sighting reported is evidence of what executed on your page.
In a script’s drawer, each version says which of these it is:
- Verified copy held. The file is stored, with its size and when it was
captured. Owners and admins can download it; everyone else can see that it
is held. The download is a
.txtfile so that it opens in an editor rather than running, and every download is recorded, with who and when, on the script’s page. - Served different bytes. When HeaderHawk fetched the URL, the origin was already serving something else. The drawer shows the hash of what it served. This is common for exactly the file that mattered: an injected payload is usually live for hours and pulled once it is noticed. A mismatch is a finding in its own right, since the origin was not serving what your visitors’ browsers ran.
- Not captured, with the reason. The site had used its 100 captures for the day; a browser reported the script from a host the site had never loaded a script from before; the URL is an IP address, an internal name or a non-standard port, or resolves to a private address; the file is over 5 MB, is a web page, or the server answered with an error, too slowly or not at all.
- No copy held. No capture was attempted: the version was first seen before captures started, on a plan below Professional, on a site with no payment pages, or without a hash to check against.
Each version is fetched once and never again, whatever the first attempt found. A retry loop driven by public reports would point HeaderHawk at someone else’s servers, and the file worth keeping would be gone by then anyway. For the same reason a browser’s report is only fetched from one of the site’s own hosts or a host its inventory already had a script on. The fetch presents itself as a desktop Chrome browser, like the daily scan, so a vendor serves it the same file your visitors get.
Copies are content-addressed: stored under their SHA-256 and nothing else, so two sites running the same file share one copy. Each site’s copy is still earned by its own fetch: a copy is attached to a script only when that script’s own URL served those bytes, and offered only to an account whose site that script is on, checked on every download. Knowing a file’s hash is not enough to get it. A copy is kept for twelve months from its capture, then deleted, and a day after the last site that reported it is deleted.
What this does not do
Section titled “What this does not do”- Most scripts are not collected by scans. Outside payment pages every row comes from a real browser loading a real page, so a page with no traffic in a given week produces no rows that week. The daily scan of a payment page fetches the scripts its HTML names (What the daily scan adds); it runs no JavaScript, so what other scripts add at run time still comes only from browsers.
- HeaderHawk never serves your headers. It writes the payment-page policy your decisions make (A policy from your decisions), but a rejected script still runs until your own site stops loading it or serves that policy enforced. HeaderHawk tells you it is still running.
- It does not edit your tags. It gives the
integrityattribute each pinned script needs; putting it in your<script>tags is yours. The SRI hash generator will hash any other file for you. - A name is not a security judgement. Identification says which published package these bytes are. It does not say the package is safe, current, or one you should be running, and an unrecognised script is not a suspicious one.
- A known vulnerability is not a finding about your page. It is about the version. HeaderHawk does not decide whether the vulnerable code is reachable, does not scan first-party code it cannot identify, and does not upgrade anything or open pull requests.
- A captured copy is stored, not analysed. HeaderHawk does not scan, deobfuscate or judge a captured script, and a stored file is not a verdict on whether it is malicious. Nor is there a copy of every version: only of those HeaderHawk could fetch unchanged when they first appeared.
- We do not index all of npm. The fingerprint index covers the most-requested packages and the versions people actually load, plus any package version one of your own script URLs names. We publish no count of fingerprints, because a number would imply a completeness nobody has.
- Nothing alerts off payment pages. A changed script on another page is
noticed by reading the Scripts views, not by an alert. Your
script-srcallowlist is the other net: a script not on it reports itself as a violation, and violations can alert — subject to an enabled alert rule and the confidence gate described in How Alerting Works.
When nothing appears
Section titled “When nothing appears”An empty Scripts page is not by itself evidence of a misconfiguration — see the caveats above, particularly caching and browser support. If you have ruled those out, work through Script Hash Reports Not Appearing in the troubleshooting guide, which also covers the causes that stop reports of every kind, such as ad blockers and domain mismatches.