Skip to content

Commit 98f0f41

Browse files
anandgupta42claude
andcommitted
fix: wrap isValidDatabricksHost env-fallback in altimate_change markers
The post-push Marker Guard uses `git diff -U5 <pre-push>...HEAD` so the hunk for this single added line did not include the surrounding block marker 8 lines above. Add an inline marker pair to satisfy strict mode. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 99d5a8a commit 98f0f41

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/opencode/src/provider/provider.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,9 @@ export namespace Provider {
744744
const host = Env.get("DATABRICKS_HOST")
745745
const token = Env.get("DATABRICKS_TOKEN")
746746
if (!host || !token) return { autoload: false }
747+
// altimate_change start — validate DATABRICKS_HOST env to prevent SSRF/CRLF injection
747748
if (!isValidDatabricksHost(host)) return { autoload: false }
749+
// altimate_change end
748750
return {
749751
autoload: true,
750752
options: {
@@ -754,7 +756,9 @@ export namespace Provider {
754756
}
755757
}
756758
const host = auth.accountId ?? Env.get("DATABRICKS_HOST")
759+
// altimate_change start — validate host (auth file or env fallback) to prevent SSRF
757760
if (!host || !isValidDatabricksHost(host)) return { autoload: false }
761+
// altimate_change end
758762
return {
759763
autoload: true,
760764
options: {

0 commit comments

Comments
 (0)