Skip to content

ODS host must resolve to a public address - #139

Merged
edandylytics merged 4 commits into
developmentfrom
app/snyk-ods-update
Sep 30, 2026
Merged

edandylytics merged 4 commits into
developmentfrom
app/snyk-ods-update

Conversation

@edandylytics

Copy link
Copy Markdown
Collaborator

This PR ensures that the ODS host and auth endpoints resolve to public addresses.

edandylytics and others added 2 commits September 30, 2026 12:00
The ODS connection test requests the user-supplied host and the auth
endpoint named in its response. Outside of dev, these requests now go only
to http(s) destinations that resolve to public addresses, checked at
connect time and on each redirect. Address classification uses ipaddr.js
(IANA special-purpose ranges). Requests also get a 10s overall deadline,
and refused requests are logged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The host field is user-entered and may contain userinfo, query parameters,
or text pasted into the wrong field, so the refused-request warning now
records just the URL's origin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@amazon-inspector-ohio

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@snyk-io-us

snyk-io-us Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Comment thread app/api/src/edfi/outbound-url-guard.ts Outdated
@amazon-inspector-ohio

Copy link
Copy Markdown

✅ I finished the code review, and left comments with the issues I found.

Comment thread app/package.json
"express-session": "^1.19.0",
"framer-motion": "^11.2.12",
"ignore": "^5.3.1",
"ipaddr.js": "^2.5.0",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ipaddr was already pulled in as a dependency of @nestjs/platform-express -- now it's a direct dependency.

…odule load order

EdfiService now uses the globally provided AppConfigService rather than
importing AppConfigModule, which had changed which instance the app
resolves. The guard tests spy on ipaddr.process instead of mocking the
module, so they pass when the app is loaded first, as in the integration
run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The connection test sends the ODS client credentials, so outside of dev
the host, the auth endpoint and any redirects must use https. With http
no longer reachable there, the http agent is removed. Tests now run the
local ODS over https using a generated self-signed certificate
(selfsigned, dev only).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@edandylytics
edandylytics merged commit 0551dfc into development Sep 30, 2026
9 checks passed
@edandylytics
edandylytics deleted the app/snyk-ods-update branch September 30, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants