[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DEPF0TH35EN33ZSEQRKVNF":3,"skill-same:01M6DEPF0TH35EN33ZSEQRKVNF":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":22,"linkOnly":23,"markdownContent":24,"markdownBody":25,"frontMatter":26,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M6DEPF0TH35EN33ZSEQRKVNF","consolidator",null,"AVFL consolidator. Merges, cross-checks, deduplicates, and scores validator findings.","iamsteveholmes\u002Fmomentum","iamsteveholmes","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F92353?v=4","01M6DENK56DRSF72CJ6FJQ4RT1","Steve Holmes","01M6DENK9KCZRYFFEB0M689F7D",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Favfl\u002Fsub-skills\u002Fconsolidator\u002FSKILL.md",[],[5,19,20,21],"avfl","validator","true","2026-11-10 10:12:30",false,"---\nname: security-harden-proxy\ndescription: Use when building a service or sidecar that calls an authenticated upstream API (Bearer token, API key) and relays results, to prevent the credential or full URL from leaking into logs or client responses\n---\n# Secret-Safe Upstream Proxy\n\nA service that authenticates to an upstream and returns aggregated\u002Fproxied data can leak the token through exception\ntext, error responses, or logs. Build it so the secret never escapes.\n\n1. **Keep the token in one place** — read it once from the environment; never embed it in returned data, never echo the\n   constructed URL (which may carry it as a query param) back to the client.\n2. **Wrap every upstream call and sever the exception chain** — HTTP-client exceptions stringify to text that includes\n   the request URL (`urllib.error.HTTPError` holds the URL, status, and *response* headers; `requests` errors embed the\n   full URL). If the key rides in the URL (`?api_key=…`), echoing `str(exc)` to the client, or calling\n   `log.exception(...)`\u002Flogging the traceback, writes the credential into responses and logs. Keep every\n   credential-bearing object — the token, the credentialed URL, **and the response\u002Frequest** (HTTP response objects\n   keep the full URL and often the authenticated request) — inside a helper, and raise a clean error from a caller\n   that holds none of them, **after** the `except` block, so it carries no reference to the original exception:\n\n   ```python\n   def _fetch(path, accept):                  # the only frame that holds token, url, resp\n       token = os.environ[\"UPSTREAM_TOKEN\"]\n       url = f\"{BASE}{path}?api_key={token}\"\n       with _get(url, accept) as resp:\n           return parse(resp)                 # all response processing stays in this frame\n\n   def fetch(path, accept):                   # no secret-bearing locals in this frame\n       failed = False\n       try:\n           return _fetch(path, accept)\n       except Exception:\n           failed = True                      # keep nothing from the original exception\n       if failed:\n           raise RuntimeError(\"upstream request failed\")   # __context__ and __cause__ are None\n   ```\n\n   Scrubbing names in the raising frame (`del url, token`) is not enough on its own: a failure while processing\n   the response leaves `resp` bound, and any later-added local reopens the leak. The helper boundary covers every\n   such object at once.\n\n   `raise … from None` inside the `except` is **not** enough: it only sets `__suppress_context__`, which hides the\n   original exception from standard traceback output and from error reporters that honor suppression (Sentry,\n   `traceback`), but the credentialed exception stays reachable on `__context__` for custom handlers, debug\n   middleware, and error reporters that walk the exception object graph directly. A cleared chain also does\n   **not** cover traceback locals: the replacement exception's `__traceback__` still contains this frame, and\n   Sentry\u002Fdebug middleware serialize each frame's locals — so `url`, `token` and `resp` leak unless the raise comes\n   from a frame that never held them (the helper above). Also turn local capture off or scrub the token in the\n   reporter (Sentry `include_local_variables=False`, or a `before_send`\u002F`EventScrubber` denylist) — a caller further\n   up the stack that holds the token would leak it.\n\n3. **Return a generic error to clients** — on failure, send a fixed status + opaque message (e.g. `502 \"upstream\n   error\"`); never include the exception text, URL, or headers in the HTTP response body.\n4. **Override the log formatter to log message-only** — ensure the access\u002Ferror logger prints just the human message,\n   not the request line or headers, and route it to stdout for container capture.\n5. **Stream and cap untrusted payloads** — when the upstream returns a large\u002Funbounded body, iterate it line-by-line and\n   abort past a byte cap rather than buffering the whole response, keeping memory bounded regardless of upstream size.\n6. **Keep it internal-only** — bind the service to the private network\u002FIP, never expose it through the reverse proxy,\n   since it holds a privileged credential.\n7. **Add a review\u002Ftest that asserts no leak** — a unit test that forces an upstream failure and asserts the token\n   string does not appear in the raised message or response, **and** that the raised error has `__context__ is\n   None` and `__cause__ is None` (or, walking the whole chain, that no exception in it stringifies to text\n   containing the token) — plus a check that serializing every frame's `f_locals` along\n   `exc.__traceback__` (the shape Sentry\u002Fdebug middleware capture) contains no credential, e.g.\n   `\"\".join(traceback.TracebackException.from_exception(exc, capture_locals=True).format())`. Force **both**\n   failures: the request itself failing, and response processing failing after a successful request (the case\n   that leaves `resp` bound). Run the assertion inside a test function — module-level frames capture every\n   global and give false positives.\n","# Secret-Safe Upstream Proxy\n\nA service that authenticates to an upstream and returns aggregated\u002Fproxied data can leak the token through exception\ntext, error responses, or logs. Build it so the secret never escapes.\n\n1. **Keep the token in one place** — read it once from the environment; never embed it in returned data, never echo the\n   constructed URL (which may carry it as a query param) back to the client.\n2. **Wrap every upstream call and sever the exception chain** — HTTP-client exceptions stringify to text that includes\n   the request URL (`urllib.error.HTTPError` holds the URL, status, and *response* headers; `requests` errors embed the\n   full URL). If the key rides in the URL (`?api_key=…`), echoing `str(exc)` to the client, or calling\n   `log.exception(...)`\u002Flogging the traceback, writes the credential into responses and logs. Keep every\n   credential-bearing object — the token, the credentialed URL, **and the response\u002Frequest** (HTTP response objects\n   keep the full URL and often the authenticated request) — inside a helper, and raise a clean error from a caller\n   that holds none of them, **after** the `except` block, so it carries no reference to the original exception:\n\n   ```python\n   def _fetch(path, accept):                  # the only frame that holds token, url, resp\n       token = os.environ[\"UPSTREAM_TOKEN\"]\n       url = f\"{BASE}{path}?api_key={token}\"\n       with _get(url, accept) as resp:\n           return parse(resp)                 # all response processing stays in this frame\n\n   def fetch(path, accept):                   # no secret-bearing locals in this frame\n       failed = False\n       try:\n           return _fetch(path, accept)\n       except Exception:\n           failed = True                      # keep nothing from the original exception\n       if failed:\n           raise RuntimeError(\"upstream request failed\")   # __context__ and __cause__ are None\n   ```\n\n   Scrubbing names in the raising frame (`del url, token`) is not enough on its own: a failure while processing\n   the response leaves `resp` bound, and any later-added local reopens the leak. The helper boundary covers every\n   such object at once.\n\n   `raise … from None` inside the `except` is **not** enough: it only sets `__suppress_context__`, which hides the\n   original exception from standard traceback output and from error reporters that honor suppression (Sentry,\n   `traceback`), but the credentialed exception stays reachable on `__context__` for custom handlers, debug\n   middleware, and error reporters that walk the exception object graph directly. A cleared chain also does\n   **not** cover traceback locals: the replacement exception's `__traceback__` still contains this frame, and\n   Sentry\u002Fdebug middleware serialize each frame's locals — so `url`, `token` and `resp` leak unless the raise comes\n   from a frame that never held them (the helper above). Also turn local capture off or scrub the token in the\n   reporter (Sentry `include_local_variables=False`, or a `before_send`\u002F`EventScrubber` denylist) — a caller further\n   up the stack that holds the token would leak it.\n\n3. **Return a generic error to clients** — on failure, send a fixed status + opaque message (e.g. `502 \"upstream\n   error\"`); never include the exception text, URL, or headers in the HTTP response body.\n4. **Override the log formatter to log message-only** — ensure the access\u002Ferror logger prints just the human message,\n   not the request line or headers, and route it to stdout for container capture.\n5. **Stream and cap untrusted payloads** — when the upstream returns a large\u002Funbounded body, iterate it line-by-line and\n   abort past a byte cap rather than buffering the whole response, keeping memory bounded regardless of upstream size.\n6. **Keep it internal-only** — bind the service to the private network\u002FIP, never expose it through the reverse proxy,\n   since it holds a privileged credential.\n7. **Add a review\u002Ftest that asserts no leak** — a unit test that forces an upstream failure and asserts the token\n   string does not appear in the raised message or response, **and** that the raised error has `__context__ is\n   None` and `__cause__ is None` (or, walking the whole chain, that no exception in it stringifies to text\n   containing the token) — plus a check that serializing every frame's `f_locals` along\n   `exc.__traceback__` (the shape Sentry\u002Fdebug middleware capture) contains no credential, e.g.\n   `\"\".join(traceback.TracebackException.from_exception(exc, capture_locals=True).format())`. Force **both**\n   failures: the request itself failing, and response processing failing after a successful request (the case\n   that leaves `resp` bound). Run the assertion inside a test function — module-level frames capture every\n   global and give false positives.\n",{"name":27,"description":28},"security-harden-proxy","Use when building a service or sidecar that calls an authenticated upstream API (Bearer token, API key) and relays results, to prevent the credential or full URL from leaking into logs or client responses","main","1cb705536db26c557b919c204aeea2cfd0658ac1","skills\u002Fmomentum\u002Fskills\u002Favfl\u002Fsub-skills\u002Fconsolidator","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes","http:\u002F\u002Fcapitalcodemonkey.blogspot.com","2026-11-09 05:58:39",{"source":8,"skillName":27,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add iamsteveholmes\u002Fmomentum --skill security-harden-proxy",{"tool":42,"command":43},"bunx","bunx skills add iamsteveholmes\u002Fmomentum --skill security-harden-proxy",{"tool":45,"command":46},"pnpm","pnpm dlx skills add iamsteveholmes\u002Fmomentum --skill security-harden-proxy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Favfl\u002Fsub-skills\u002Fconsolidator\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"agents\u002Fopenai.yaml","REFERENCE","参考文档",43,"https:\u002F\u002Fgithub.com\u002FRB-chrismandich\u002FManifest\u002Fblob\u002Fmain\u002Fplugins\u002Fmanifest-security\u002Fskills\u002Fsecurity-harden-proxy\u002Fagents\u002Fopenai.yaml",[57,78,96,118,135,152],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":22},"01M6DES6J0HGT27SEJJWF316FV","upstream-fix","Traces quality failures upstream to spec, rule, or workflow root cause. Proposes fixes at the right level.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Fupstream-fix\u002FSKILL.md",[],[64,65,66,67,68,69,70,71,72,73,74,75,76,77],"upstream","upstream fix","fix","to spec","root cause","traces","fixes","at","high","root","rule","quality","workflow","spec",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":22},"01M6DES4A08NFWQM0AJBR2RRX5","triage","Dedup gate + batch-classify observations into five classes, enrich ARTIFACTs, batch-approve, delegate to intake\u002Fdecision or queue.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Ftriage\u002FSKILL.md",[],[80,85,86,87,88,89,90,91,72,92,93,94,95],"batch","intake","artifacts","decision","queue","delegate","approve","observations","enrich","classify","gate",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":22},"01M6DERYX8W6Z9Z4RM5V6E9HED","sprint-planning","Sprint planning — story selection, team composition, Gherkin specs, and visual companion plan gate for developer sign-off.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Fsprint-planning\u002FSKILL.md",[],[103,104,105,72,106,107,108,109,110,111,112,113,114,115,116,117,95],"planning","sprint","sprint planning","visual companion","plan gate","for","companion","sign","visual","selection","Composition","Story","plan","team","developer",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":22},"01M6DERWCP7Y0WDY5KG6109RQB","sprint-manager","Sole writer of stories\u002Findex.json and sprints\u002Findex.json — validates state transitions, activates sprints, manages epic membership.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Fsprint-manager\u002FSKILL.md",[],[125,104,126,127,128,129,130,131,132,133,134],"sprint manager","manager","writer","stories","sprints","EPIC","transitions","json","index","state",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":22},"01M6DERS7B4QHAH5GZHHBA4AHB","sprint-dev","Sprint execution — dependency-driven story development, post-merge AVFL, and team review.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Fsprint-dev\u002FSKILL.md",[],[142,143,104,116,144,145,146,147,148,149,72,150,19,151,114],"dev","sprint dev","execution","team review","development","merge","review","dependency","post","driven",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":22},"01M6DERP0A271FYSAXCV85GF04","retro","Sprint retrospective — transcript audit engine (dynamic Workflow), story verification, findings document, and sprint closure.","https:\u002F\u002Fgithub.com\u002Fiamsteveholmes\u002Fmomentum\u002Fblob\u002Fmain\u002Fskills\u002Fmomentum\u002Fskills\u002Fretro\u002FSKILL.md",[],[154,159,160,72,161,104,162,114,163,164,165,166,167,76],"sprint retrospective","closure","dynamic workflow","document","engine","audit","verification","transcript","retrospective"]