{"record":{"id":"827ca5e7a356d850","repo":"santifer/career-ops","slug":"jobspresso-url-must-use-https-url","errorCode":null,"errorMessage":"jobspresso: URL must use HTTPS: ${url}","messagePattern":"jobspresso: URL must use HTTPS: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/jobspresso.mjs","lineNumber":24,"sourceCode":"// (https://jobspresso.co/?feed=job_feed). The feed is public, no-auth,\n// and XML, so it is parsed in-process with the same tiny tag extractor\n// approach as providers/personio.mjs rather than adding an XML dependency.\n//\n// Wire in via a `job_boards:` entry with `provider: jobspresso`.\n\nconst FEED_URL = 'https://jobspresso.co/?feed=job_feed';\nconst TRUSTED_HOST = 'jobspresso.co';\n\n/** @param {string} url */\nfunction assertJobspressoUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`jobspresso: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== \"https:\")\n    throw new Error(`jobspresso: URL must use HTTPS: ${url}`);\n  if (parsed.hostname !== TRUSTED_HOST) {\n    throw new Error(\n      `jobspresso: untrusted hostname \"${parsed.hostname}\" - must be ${TRUSTED_HOST}`,\n    );\n  }\n  return url;\n}\n\n// NaN-safe Date.parse - `|| undefined` would also coerce a valid epoch 0.\nfunction toEpochMs(value) {\n  if (!value) return undefined;\n  const parsed = Date.parse(value);\n  return Number.isNaN(parsed) ? undefined : parsed;\n}\n\n/** @type {Provider} */\nexport default {\n  id: \"jobspresso\",","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/providers/jobspresso.mjs#L6-L42","documentation":"assertJobspressoUrl requires the https: protocol. Any URL that parses but uses http:// (or another scheme) is rejected — Jobspresso's feed is only fetched over TLS to protect request integrity and prevent downgrade/SSRF variants. This check runs after parseability and before the hostname allowlist.","triggerScenarios":"Calling assertJobspressoUrl with 'http://jobspresso.co/?feed=job_feed' or any other non-https scheme that parses as a valid URL.","commonSituations":"http:// pasted into the job_boards config; an internal http-only staging mirror configured for the provider; tooling that strips the 's' during config templating.","solutions":["Change the scheme to https:// in the portals.yml entry","Fix any underlying TLS problem instead of downgrading to http","Do not point this provider at non-https mirrors — it hard-requires TLS"],"exampleFix":"// before\nassertJobspressoUrl('http://jobspresso.co/?feed=job_feed');\n// after\nassertJobspressoUrl('https://jobspresso.co/?feed=job_feed');","handlingStrategy":"validation","validationCode":"function isHttpsJobspresso(url) {\n  try { return new URL(url).protocol === 'https:'; } catch { return false; }\n}","typeGuard":"function requireHttps(u) {\n  const p = URL.canParse(u) ? new URL(u) : null;\n  if (!p || p.protocol !== 'https:') throw new TypeError(`not https: ${u}`);\n  return p;\n}","tryCatchPattern":"try {\n  assertJobspressoUrl(u);\n} catch (e) {\n  if (/must use HTTPS/.test(e.message)) {\n    console.error('Jobspresso feed requires https:// — fix the scheme in portals.yml');\n    return [];\n  }\n  throw e;\n}","preventionTips":["Never configure http:// for job board feeds","Let templates default to https:// so the scheme is never typed manually","Treat any TLS problem as a cert fix, not a downgrade to http"],"tags":["url-validation","https","security","ssrf-protection"],"backgroundTag":"invalid-url-format","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}