{"record":{"id":"2120e26f3df6d891","repo":"santifer/career-ops","slug":"landingjobs-url-must-use-https-url","errorCode":null,"errorMessage":"landingjobs: URL must use HTTPS: ${url}","messagePattern":"landingjobs: URL must use HTTPS: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/landingjobs.mjs","lineNumber":28,"sourceCode":"// NOTE: the v1 feed carries no company-name field — the employer slug only\n// appears in the posting URL path (`https://landing.jobs/at/<slug>/<job>`), so\n// `company` is derived best-effort from that slug (humanized) and falls back to\n// the portal entry name. The whole active set is returned in one call.\n//\n// Wire in via a `job_boards:` entry with `provider: landingjobs`.\n\nconst FEED_URL = 'https://landing.jobs/api/v1/jobs';\nconst TRUSTED_HOST = 'landing.jobs';\n\n/** @param {string} url */\nfunction assertLandingUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`landingjobs: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== 'https:') throw new Error(`landingjobs: URL must use HTTPS: ${url}`);\n  if (parsed.hostname !== TRUSTED_HOST) {\n    throw new Error(`landingjobs: untrusted hostname \"${parsed.hostname}\" — must be ${TRUSTED_HOST}`);\n  }\n  return url;\n}\n\n// NaN-safe Date.parse.\nfunction toEpochMs(value) {\n  if (typeof value !== 'string' || !value) return undefined;\n  const parsed = Date.parse(value);\n  return Number.isNaN(parsed) ? undefined : parsed;\n}\n\n/**\n * Derive a best-effort company name from a Landing.jobs posting URL.\n * Posting URLs are `https://landing.jobs/at/<slug>/<job>`; the `<slug>` is\n * humanized (hyphens/underscores → spaces, title-cased). Returns '' when the\n * URL is not the expected `/at/<slug>/…` shape. Exported for unit tests.","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/santifer/career-ops/blob/9b17a8ac97b398a496b38e423ae24e433b43254f/providers/landingjobs.mjs#L10-L46","documentation":"Thrown by assertLandingUrl() when the URL parses but its protocol is not https:. The landing.jobs provider pins all requests to HTTPS as an SSRF guard; an http:// URL (or any other scheme) is rejected before any network call.","triggerScenarios":"An api/careers_url entry using http:// instead of https://; a constructed URL that inherited a non-https scheme from user input.","commonSituations":"A legacy or hand-edited entry that used http; a copy-paste from a source that normalized to http.","solutions":["Change the protocol in the api/careers_url field to https://.","Re-run the scan to confirm the guard no longer trips."],"exampleFix":"# before\nacme:\n  provider: landingjobs\n  api: http://landing.jobs/api/v1/jobs\n\n# after\nacme:\n  provider: landingjobs\n  api: https://landing.jobs/api/v1/jobs","handlingStrategy":"validation","validationCode":"function isHttps(url) {\n  try { return new URL(url).protocol === 'https:'; } catch { return false; }\n}","typeGuard":"/** @param {string} url @returns {boolean} */\nfunction isHttpsUrl(url) {\n  try { return new URL(url).protocol === 'https:'; } catch { return false; }\n}","tryCatchPattern":null,"preventionTips":["Normalize all config URLs to https:// at load time.","Reject http:// entries in a config-lint pass.","Document the HTTPS-only policy for every provider."],"tags":["landingjobs","ssrf-guard","url-validation","config"],"backgroundTag":null,"analyzedSha":"9b17a8ac97b398a496b38e423ae24e433b43254f","analyzedAt":"2026-08-13T00:48:39.135Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}