Commit Graph
2 Commits
Author SHA1 Message Date
Charles YaoandClaude Opus 5 77a1213bf7 fix(dify-builder): tighten secret matching, credential keys and host templates
Final-review minors:
- is_user_supplied_secret: a verbatim match needs a remainder of at least
  8 characters, so "Bearer key" no longer counts as supplied because the goal
  says "key".
- is_credential_key: Ocp-Apim-Subscription-Key ("subscription" key prefix),
  and cookie / credential / credentials / bearer as last segments. No
  "header" segment -- accept_header stays non-credential.
- A bare Bearer/Basic/Token word is kept as an auth scheme only on an
  Authorization / Proxy-Authorization line; under any other credential key
  (X-Auth-Token: token, api_key: token) it is replaced whole.
- endpoint_variable_names also collects a start template inside the parsed
  host (https://{{#s.host#}}/v1), via the shared core/dify_builder/urls.py;
  path/query templates stay mockable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 10:10:57 -07:00
Charles YaoandClaude Opus 5 e54a2cbd2a fix(dify-builder): ground only credentials and host endpoints, never data inputs
The test form and mock data skipped every start variable an http node
read, so a search query or a language header was never mocked. Only a
host-position URL template, credential-keyed header/param lines and an
api-key auth now count, with one shared is_credential_key in core. A
bare "key" param, an empty credential and a bare "Bearer" are grounded
too, and an existing Dify template is never re-grounded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 09:43:00 -07:00