From a senior to future senior Hackers

Latest Posts

View all posts →

Latest Videos

View all videos →
One PWA Install Flow for Chrome 158's Install API and Legacy beforeinstallprompt

One PWA Install Flow for Chrome 158's Install API and Legacy beforeinstallprompt

One install button has to survive two eras: the legacy beforeinstallprompt event that Chromium ships today, and a reported direct install API in Chrome 158. This walkthrough builds a capability layer around both. You get the documented legacy lifecycle — the event firing once per page load, preventDefault keeping the token, prompt showing the dialog, userChoice resolving with accepted or dismissed, appinstalled firing on success — plus the failure modes that make install buttons lie: iOS Safari never fires the event at all, already-installed apps go silent, a dismissed dialog starts a suppression window, and duplicate listeners on SPA route changes overwrite the stored event with an already-spent one. The direct path gets the same treatment, with an important caveat stated up front: the Chrome 158 direct install claim comes from a single secondary report and is unverified. No method name, signature, or permission model is documented. So detection walks a short ordered list of candidate probes instead of hardcoding a name, and every code sample is shaped to survive an unknown signature rather than describing an API that has been called. Everything above the adapters sees one normalized outcome enum — accepted, dismissed, unavailable, error — so the button cannot get stuck in the wrong state, and an unreadable return value never gets claimed as a success. Unavailable covers already installed, cooldown active, unsupported environment, and unknown shape, and it never surfaces as an error toast. Full code and reasoning: https://hackyjs.com/posts/building-one-pwa-install-flow-for-chrome-158s-install-api-and-legacy-beforeinstallprompt-browsers

pwachromeweb-apis
Auditing Third-Party Script Loads for Malware After a Tag Vendor Breach

Auditing Third-Party Script Loads for Malware After a Tag Vendor Breach

A defensive walkthrough of how a tag vendor breach reaches your users through trusted third-party script origins, and how to audit for it. The video covers the loader as trust anchor, container custom HTML tags, late DOM injection, origin inventory, ownership, script allowlisting, CSP and SRI limits, config snapshots, DOM monitoring, and tested kill switches. This is lab-scoped security content. It shows the bug and the fix, not a working exploit against a real target. Full write-up: https://hackyjs.com/posts/auditing-third-party-script-loads-for-malware-after-a-tag-vendor-breach

supply-chain-securitythird-party-scriptscontent-security-policy
Auditing Python Install Hooks: Reproducing the agent-framework Credential Theft in a Lab

Auditing Python Install Hooks: Reproducing the agent-framework Credential Theft in a Lab

Public reporting in November 2026 said hijacked releases of Microsoft's agent-framework package on PyPI were used to steal Azure and GitHub credentials. The summaries leave the exact malicious versions, the compromise path, and whether the artefacts were sdists or wheels unknown. This short follows the post's defensive lab: a local PEP 503 index, a local collector, fabricated canary credentials, and a Docker network with no egress. It shows a minimal build hook that reads the install environment and posts to the collector, then covers the audit surfaces and the controls that reduce exposure: Trusted Publishing, scoped tokens, and lockfiles. The lab is intentionally local and uses fake credentials. Read the full walkthrough with commands and captured output at https://hackyjs.com/posts/auditing-python-install-hooks-reproducing-the-agent-framework-credential-theft-in-a-lab

pythonsupply-chain-securitypypi