Subresource Integrity Auditor avatar

Subresource Integrity Auditor

Pricing

Pay per usage

Go to Apify Store
Subresource Integrity Auditor

Subresource Integrity Auditor

Audit one public page for Subresource Integrity coverage on external scripts and stylesheets. Flags missing integrity, weak hashes, invalid formats, crossorigin gaps, and insecure resource URLs.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Sanskar Jaiswal

Sanskar Jaiswal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Audit one public page for Subresource Integrity coverage on external scripts and stylesheets. The actor fetches the page HTML once, extracts script and stylesheet resources, and returns SRI readiness fields suitable for QA pipelines, security checks, and scheduled monitoring.

Use cases

  • Check marketing pages before launch for third-party CDN script risk.
  • Monitor CMS templates for missing SRI on scripts and stylesheets.
  • Add a focused SRI gate to security and frontend QA workflows.
  • Inventory third-party assets that should be pinned with integrity hashes.

Input

FieldTypeRequiredDescription
startUrlstringYesPublic page URL to audit. HTTP and HTTPS only. Private IP ranges and URL credentials are blocked.
timeoutSecondsintegerNoRequest timeout in seconds. Default: 10. Minimum: 3. Maximum: 30.
maxHtmlBytesintegerNoMaximum HTML bytes to download and parse. Default: 1048576. Maximum: 2097152.

Output

Each run pushes one dataset item.

FieldTypeDescription
inputUrlstringURL provided as input.
finalUrlstringFinal URL after redirects.
statusintegerHTTP response status, when available.
httpsbooleanWhether the final page was loaded over HTTPS.
truncatedbooleanWhether HTML parsing stopped at maxHtmlBytes.
fetchErrorstring or nullFetch or validation error, when one occurred.
resourceCountintegerNumber of scripts and stylesheets checked.
thirdPartyCountintegerNumber of checked resources on a different registrable domain.
missingIntegrityCountintegerThird-party resources missing an integrity attribute.
weakHashCountintegerResources using only sha256 integrity.
invalidIntegrityCountintegerResources with unsupported or invalid integrity token format.
missingCrossoriginCountintegerCross-origin resources using SRI without crossorigin.
insecureResourceCountintegerResources loaded over non-HTTPS URLs.
resourcesarrayPer-resource details: tag, URL, third-party flag, integrity status, algorithms, crossorigin, HTTPS, issues, and recommendation.
issuesarrayDeduplicated issue list.
scoreintegerSRI readiness score from 0 to 100.
gradestringLetter grade: A+, A, B, C, D, E, or F.
checkedAtstringISO timestamp.
recommendationsarrayActionable remediation steps.

Example input

{
"startUrl": "https://example.com",
"timeoutSeconds": 10,
"maxHtmlBytes": 1048576
}

Example output

{
"inputUrl": "https://example.com",
"finalUrl": "https://example.com/",
"status": 200,
"https": true,
"truncated": false,
"fetchError": null,
"resourceCount": 2,
"thirdPartyCount": 1,
"missingIntegrityCount": 1,
"weakHashCount": 0,
"invalidIntegrityCount": 0,
"missingCrossoriginCount": 0,
"insecureResourceCount": 0,
"resources": [
{
"tag": "script",
"url": "https://cdn.example.net/app.js",
"thirdParty": true,
"hasIntegrity": false,
"algorithms": [],
"validIntegrityFormat": false,
"weakHash": false,
"crossorigin": null,
"https": true,
"issues": ["Third-party resource is missing Subresource Integrity."],
"recommendation": "Third-party resource is missing Subresource Integrity."
}
],
"issues": ["Third-party resource is missing Subresource Integrity."],
"score": 80,
"grade": "B",
"checkedAt": "2026-09-11T00:00:00.000Z",
"recommendations": ["Add integrity hashes to third-party scripts and stylesheets that are stable enough to pin."]
}

Security

The actor accepts only public HTTP and HTTPS URLs. It rejects URL credentials, private IPv4 and IPv6 literals, and hostnames that resolve to private IP ranges. Redirect targets are revalidated before following. The actor fetches only the input page HTML and does not fetch discovered script or stylesheet URLs.

Pricing suggestion

EventSuggested price
Actor start$0.005
Page audited$0.01

Suggested total for a typical run: about $0.015 per audited page.

FAQ

Does this verify the remote file hash?

No. It audits page markup for SRI posture and does not fetch discovered resources. This keeps runs fast, bounded, and safer for SSRF control.

Why are first-party resources not counted as missing SRI?

SRI is most valuable for third-party CDN resources. First-party resources are still listed, but missing integrity on same-site files is not scored as a defect.

Does it run JavaScript?

No. It reads the initial HTML response only. Browser-rendered resources are outside this actor's scope.