Describe the bug
OWASP.getLatest() fetches the latest secure-headers definitions from https://owasp.org/www-project-secure-headers/ci/headers_add.json. Following OWASP's project migration off their CMS and onto GitHub, that URL now returns HTTP 404. Because the fetch logic in src/owasp.js treats any non-200 response as a signal to fall back to the bundled json/owasp.json, the failure is silent — the plugin keeps working but always uses the stale bundled defaults and never picks up upstream header updates.
The official OWASP notice confirms the move: the project content now lives at https://github.com/OWASP/www-project-secure-headers, and the data file is available at https://raw.githubusercontent.com/OWASP/www-project-secure-headers/master/ci/headers_add.json (returns 200).
To Reproduce
Steps to reproduce the behavior:
serverless.yml
...
custom:
documentation:
securityHeaders:
cacheControl: true
xFrameOptions: true
- Run the documentation generation command.
- Observe (e.g. via a debugger or by adding a log) that the request to
https://owasp.org/www-project-secure-headers/ci/headers_add.json returns a 404.
- The plugin silently falls back to the bundled
json/owasp.json instead of the live OWASP definitions.
Or reproduce the root cause directly:
curl -s -o /dev/null -w "%{http_code}\n" https://owasp.org/www-project-secure-headers/ci/headers_add.json
# -> 404
curl -s -o /dev/null -w "%{http_code}\n" https://raw.githubusercontent.com/OWASP/www-project-secure-headers/master/ci/headers_add.json
# -> 200
Expected behavior
getLatest() should successfully retrieve the current OWASP secure-headers definitions from the new GitHub-hosted location so the generated OpenAPI spec reflects up-to-date header values, rather than silently falling back to the bundled copy.
Desktop (please complete the following information):
- Serverless version: [e.g. 3.x — fill in your version]
- serverless-openapi-documenter version: 0.1.1
Additional context
- Root cause is the OWASP project's migration to GitHub; the old
owasp.org/.../ci/headers_add.json path is gone.
- The same migration also breaks two documentation anchor links that point at
owasp.org/www-project-secure-headers/#pragma and #x-permitted-cross-domain-policies (in README.md, src/owasp.js, and src/definitionGenerator.js) — the page still loads but those sections no longer exist there; the content moved to mainsite/01_headers.md in the new repo.
- I have a fix ready (update the fetch URL to the new raw GitHub location, update the affected unit-test nock mocks, and optionally add a
console.warn on the fallback path so future breakage isn't silent). I'd like to request collaborator/contributor access to open a PR — or, if you'd prefer, I'm happy to submit it from a fork.
Describe the bug
OWASP.getLatest()fetches the latest secure-headers definitions fromhttps://owasp.org/www-project-secure-headers/ci/headers_add.json. Following OWASP's project migration off their CMS and onto GitHub, that URL now returns HTTP 404. Because the fetch logic insrc/owasp.jstreats any non-200 response as a signal to fall back to the bundledjson/owasp.json, the failure is silent — the plugin keeps working but always uses the stale bundled defaults and never picks up upstream header updates.The official OWASP notice confirms the move: the project content now lives at
https://github.com/OWASP/www-project-secure-headers, and the data file is available athttps://raw.githubusercontent.com/OWASP/www-project-secure-headers/master/ci/headers_add.json(returns 200).To Reproduce
Steps to reproduce the behavior:
https://owasp.org/www-project-secure-headers/ci/headers_add.jsonreturns a 404.json/owasp.jsoninstead of the live OWASP definitions.Or reproduce the root cause directly:
Expected behavior
getLatest()should successfully retrieve the current OWASP secure-headers definitions from the new GitHub-hosted location so the generated OpenAPI spec reflects up-to-date header values, rather than silently falling back to the bundled copy.Desktop (please complete the following information):
Additional context
owasp.org/.../ci/headers_add.jsonpath is gone.owasp.org/www-project-secure-headers/#pragmaand#x-permitted-cross-domain-policies(inREADME.md,src/owasp.js, andsrc/definitionGenerator.js) — the page still loads but those sections no longer exist there; the content moved tomainsite/01_headers.mdin the new repo.console.warnon the fallback path so future breakage isn't silent). I'd like to request collaborator/contributor access to open a PR — or, if you'd prefer, I'm happy to submit it from a fork.