Title: feat(forge-security,forge-cli): live OSV.dev HTTP batch query client, advisory hydrator & cache TTL · Issue #260 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-security,forge-cli): live OSV.dev HTTP batch query client, advisory hydrator & cache TTL · Issue #260 · elcode-id/elcode-forge
X Title: feat(forge-security,forge-cli): live OSV.dev HTTP batch query client, advisory hydrator & cache TTL · Issue #260 · elcode-id/elcode-forge
Description: Part of #256. Scope Add crates/forge-security/src/osv/client.rs using ureq with bounded response reading (4 MiB max) and 5-10s timeout to query POST https://api.osv.dev/v1/querybatch and hydrate full advisory records via GET https://api....
Open Graph Description: Part of #256. Scope Add crates/forge-security/src/osv/client.rs using ureq with bounded response reading (4 MiB max) and 5-10s timeout to query POST https://api.osv.dev/v1/querybatch and hydrate fu...
X Description: Part of #256. Scope Add crates/forge-security/src/osv/client.rs using ureq with bounded response reading (4 MiB max) and 5-10s timeout to query POST https://api.osv.dev/v1/querybatch and hydrate fu...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/260
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-security,forge-cli): live OSV.dev HTTP batch query client, advisory hydrator & cache TTL","articleBody":"Part of #256.\n\n## Scope\n- Add `crates/forge-security/src/osv/client.rs` using `ureq` with bounded response reading (4 MiB max) and 5-10s timeout to query `POST https://api.osv.dev/v1/querybatch` and hydrate full advisory records via `GET https://api.osv.dev/v1/vulns/\u003cid>`.\n- Add cache freshness TTL checking (`LocalAdvisoryCache::is_cache_fresh`, default 24h) and merge live fetched advisories into `.eforge/cache/osv/\u003cecosystem>.json`.\n- Expose `SecurityScanner::scan_dependencies_with_options(repo_root, dependencies, offline)` and wire the `offline` flag in `crates/forge-cli/src/commands/security.rs` (`eforge security --audit` vs `--offline`).\n\n## Out of scope\n- Performing outbound network requests during `eforge scan` (must remain 100% local-first and `\u003c 2s`).\n\n## Acceptance criteria\n- `eforge security --audit --offline` makes 0 network calls and remains deterministic.\n- `eforge security --audit` (when online and cache is stale) builds accurate OSV batch queries for pinned dependencies across npm, PyPI, Go, Cargo, and Composer, saves advisories to `.eforge/cache/osv/`, and matches vulnerabilities via `VulnerabilityMatcher`.\n- Network errors, timeouts, or malformed HTTP payloads never panic or abort the scan — gracefully falling back to local cache + embedded advisories.\n\n## Technical notes\n- Add `ureq.workspace = true` to `crates/forge-security/Cargo.toml`.\n- Keep payload construction (`build_osv_batch_queries`) and response deserialization pure functions so unit tests cover them without requiring live internet access.\n\n## Dependencies\n- Blocked by: #257\n\n## Definition of Done\n- [ ] Implementation completed in `crates/forge-security` and `crates/forge-cli/src/commands/security.rs`.\n- [ ] Unit tests cover batch query serialization, clean version extraction, cache freshness TTL, and offline fallback.\n- [ ] Tier 1 (`forge-security`) and Tier 2 (`forge-cli`) checks pass cleanly.\n- [ ] `docs/ARCHITECTURE_STATE.md` updated and PR squash-merged to `develop` after 100% green CI.\n","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-11-17T05:25:53Z","url":"https://github.com/elcode-id/elcode-forge/issues/260"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1c5b7c6e-63ef-2de3-e9e7-b4a6d4ccb7c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B610:7F1CA:78DCB4:A720A5:6B0596B5 |
| html-safe-nonce | 215633fffb463b14536e70314d1eb3efbb39d9c4842faa8e44ce631a9310aaa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjEwOjdGMUNBOjc4RENCNDpBNzIwQTU6NkIwNTk2QjUiLCJ2aXNpdG9yX2lkIjoiMjg4MDI4MzY4MTI3OTU0NzA2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cd348e5acda84ab9b1c0e5f8699c8c10726e470690b10a49b9e27beaf5351b84 |
| hovercard-subject-tag | issue:6438044592 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/elcode-id/elcode-forge/260/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e81c3b2a5e65893916beaedbe5f8488c704ce54ead2f8148f89b71ea74950653/elcode-id/elcode-forge/issues/260 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e81c3b2a5e65893916beaedbe5f8488c704ce54ead2f8148f89b71ea74950653/elcode-id/elcode-forge/issues/260 |
| og:image:alt | Part of #256. Scope Add crates/forge-security/src/osv/client.rs using ureq with bounded response reading (4 MiB max) and 5-10s timeout to query POST https://api.osv.dev/v1/querybatch and hydrate fu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luksluki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/elcode-id/elcode-forge git https://github.com/elcode-id/elcode-forge.git |
| octolytics-dimension-user_id | 337957755 |
| octolytics-dimension-user_login | elcode-id |
| octolytics-dimension-repository_id | 1423983661 |
| octolytics-dimension-repository_nwo | elcode-id/elcode-forge |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1423983661 |
| octolytics-dimension-repository_network_root_nwo | elcode-id/elcode-forge |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width