{"record":{"id":"e572f9f608fc93af","repo":"santifer/career-ops","slug":"breezy-invalid-url-url","errorCode":null,"errorMessage":"breezy: invalid URL: ${url}","messagePattern":"breezy: invalid URL: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/breezy.mjs","lineNumber":24,"sourceCode":"// Per-tenant subdomains are the variable part, so SSRF defence uses a regex\n// match on `<safe-tenant>.breezy.hr` rather than a static allowlist (same\n// approach as the recruitee / bamboohr providers).\n//\n// Breezy boards expose every published position as a public JSON array at\n// `<tenant>.breezy.hr/json` — title, absolute url, location, and a published\n// date, all in the list payload at zero token cost (no per-job request, so the\n// scanner stays zero-token). Breezy's authenticated REST API (api.breezy.hr) is\n// intentionally NOT used; only the public board feed.\n\nconst BREEZY_HOST_RE = /^[a-z0-9][a-z0-9-]*\\.breezy\\.hr$/;\n\n/** @param {string} url */\nfunction assertBreezyUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`breezy: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== 'https:') throw new Error(`breezy: URL must use HTTPS: ${url}`);\n  if (!BREEZY_HOST_RE.test(parsed.hostname)) {\n    throw new Error(`breezy: untrusted hostname \"${parsed.hostname}\" — must match <tenant>.breezy.hr`);\n  }\n  return url;\n}\n\n/**\n * Resolve the tenant origin (`https://<tenant>.breezy.hr`) from an entry.\n * Honours an explicit `api:` URL, else parses `careers_url`.\n * @param {import('./_types.js').PortalEntry} entry\n * @returns {string | null}\n */\nfunction resolveOrigin(entry) {\n  const rawApi = typeof entry.api === 'string' ? entry.api : '';\n  const rawCareers = typeof entry.careers_url === 'string' ? entry.careers_url : '';\n  const raw = (rawApi || rawCareers).trim();","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/providers/breezy.mjs#L6-L42","documentation":"Breezy validates URLs via `assertBreezyUrl`. The 'invalid URL' variant fires when `new URL(url)` throws — the input is not parseable as an absolute URL. First of three sequential SSRF guards.","triggerScenarios":"`assertBreezyUrl(url)` (called on the derived `${origin}` or an `api:` field) receives a value `new URL()` cannot parse: schemeless host, protocol-relative URL, empty string, or illegal characters.","commonSituations":"An `api:` field set without `https://`, a careers_url broken by templating, or config injection mangling the scheme.","solutions":["Provide a full `https://<tenant>.breezy.hr` URL.","Validate entry URLs at config load to surface the offending row.","Strip whitespace from templated URL fields."],"exampleFix":"# before\n- name: Acme\n  api: acme.breezy.hr\n\n# after\n- name: Acme\n  api: https://acme.breezy.hr","handlingStrategy":"validation","validationCode":"function isValidAbsoluteUrl(u) {\n  try { new URL(u); return true; } catch { return false; }\n}\nfor (const f of ['api', 'careers_url']) {\n  if (entry[f] && !isValidAbsoluteUrl(entry[f])) {\n    throw new Error(`breezy: entry ${entry.name} has malformed ${f}: ${entry[f]}`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Require fully-qualified URLs in config entries.","Run `new URL()` over api/careers_url at startup.","Use detect() so malformed entries are skipped rather than thrown."],"tags":["breezy","url-validation","ssrf","config"],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}