{"record":{"id":"df2f2edd19c67ad8","repo":"santifer/career-ops","slug":"getonbrd-url-must-use-https-url","errorCode":null,"errorMessage":"getonbrd: URL must use HTTPS: ${url}","messagePattern":"getonbrd: URL must use HTTPS: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/getonbrd.mjs","lineNumber":29,"sourceCode":"// 3, override with `max_pages` on the portal entry).\n//\n// Wire in via a `job_boards:` entry with `provider: getonbrd`.\n\nconst FEED_BASE = 'https://www.getonbrd.com/api/v0/categories/programming/jobs';\nconst TRUSTED_HOST = 'www.getonbrd.com';\nconst PER_PAGE = 100;\nconst DEFAULT_MAX_PAGES = 3;\nconst MAX_PAGES_CAP = 50;\n\n/** @param {string} url */\nfunction assertGetonbrdUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`getonbrd: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== 'https:') throw new Error(`getonbrd: URL must use HTTPS: ${url}`);\n  if (parsed.hostname !== TRUSTED_HOST) {\n    throw new Error(`getonbrd: untrusted hostname \"${parsed.hostname}\" — must be ${TRUSTED_HOST}`);\n  }\n  return url;\n}\n\n/** Resolve the page cap: a positive integer `max_pages` on the entry, capped. */\nfunction resolveMaxPages(entry) {\n  const v = entry?.max_pages;\n  if (Number.isInteger(v) && v > 0) return Math.min(v, MAX_PAGES_CAP);\n  return DEFAULT_MAX_PAGES;\n}\n\n/**\n * Normalize a single Get on Board job (JSON:API resource). Exported for tests.\n *\n * Field mapping → the normalized Job shape:\n *   - title:    `attributes.title`, trimmed (items without one are dropped).","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/providers/getonbrd.mjs#L11-L47","documentation":"getonbrd.mjs throws this in assertGetonbrdUrl() after the URL parses but its protocol is not 'https:'. It enforces TLS for the Get on Board feed. Since the validated URL derives from FEED_BASE, a live throw means FEED_BASE (or a test argument) was set to an http:// or other-scheme URL.","triggerScenarios":"FEED_BASE changed to 'http://www.getonbrd.com/...' for local interception; a test calls assertGetonbrdUrl('http://www.getonbrd.com/...'); a stale fork predates the HTTPS-only policy.","commonSituations":"Local debugging through a non-TLS proxy; an env override downgraded the scheme; a copy-paste from an old doc link that used http.","solutions":["Keep FEED_BASE on https:// (the public feed is TLS-only).","For local interception, trust a proxy CA against the HTTPS endpoint instead of downgrading.","Remove tests that pass http URLs unless they are explicitly asserting this error."],"exampleFix":"// before\nconst FEED_BASE = 'http://www.getonbrd.com/api/v0/categories/programming/jobs';\n\n// after\nconst FEED_BASE = 'https://www.getonbrd.com/api/v0/categories/programming/jobs';","handlingStrategy":"validation","validationCode":"// Confirm the Get on Board feed scheme at startup.\nfunction checkGetonbrdScheme() {\n  const u = new URL('https://www.getonbrd.com/api/v0/categories/programming/jobs');\n  if (u.protocol !== 'https:') throw new Error('getonbrd feed must be HTTPS');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never set FEED_BASE to http for local debugging; use a trusted proxy CA.","Add a lint/test forbidding http: in FEED_BASE.","Document the HTTPS-only policy in the provider header."],"tags":["url-validation","tls","ssrf-guard","getonbrd","config"],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}