skip to content

Publishing & Disclosure

Your duties as somebody else's upstream: how you publish, how you retract a bad release, how a report reaches you, what you owe downstream after a compromise. Few engineers reason as the upstream.

on this pageshow

explore

questions

page 1 of 2

For a package registry account, why is a passkey phishing-resistant but a TOTP code not?

level: juniorimportance: must knowfreq 70%

answer

  1. not all second factors are equal
  2. the attacker proxies in real time
  3. a code is a value you can relay
  4. credential bound to one origin
  5. WebAuthn relying-party ID

basics

~20 s

A passkey signs a challenge bound to the registry's real domain, so a lookalike login page cannot relay it. A TOTP code is just six digits, which an attacker proxying your login replays within seconds.

solid answer

~50 s

Both are second factors, but only one resists a live proxy. With TOTP the user reads a six-digit code and types it into whatever page asked for it; an adversary-in-the-middle page on a lookalike domain forwards the username, password and code to the real registry inside the code's validity window and takes the session. A passkey is a WebAuthn credential scoped to the registry's origin: the browser will only produce an assertion for the relying-party ID the credential was registered against, and the signature covers a server-supplied challenge, so a lookalike domain gets nothing usable and there is no code to type anywhere. SMS is weaker still, adding SIM-swap and carrier-support fraud on top of relayability. For a publishing account, where one session mints a version millions of machines install, the property you want is origin binding rather than merely "a second factor".

go deeper

for a junior

Be ready to name the three common second factors and say which one a fake login page cannot relay. Knowing that a passkey is tied to a specific website, and a typed code is not, is the answer.

for a middle

Explain the mechanics: an adversary-in-the-middle page proxies the real login, so any factor that produces a value a human copies gets forwarded. Describe origin binding and the fact that the private key never leaves the authenticator.

for a senior

Show that you close the residual paths. Account recovery, backup email and long-lived automation tokens all bypass the strong factor, so enrolling a passkey is the start of hardening a publishing identity rather than the end of it.

for a principal

Own the rollout question: mandating phishing-resistant factors across an organization means buying and shipping authenticators, handling lost devices without a weak reset path, and deciding which accounts must comply first when you cannot do everyone at once.

A package registry account is not an ordinary login. Whoever holds a session on it can publish a version that resolvers everywhere will treat as the genuine continuation of a name people already trust. That makes the second factor on that account a supply-chain control, and it makes the *kind* of second factor matter more than the fact that one exists. ## What "a second factor" buys, and where it stops Multi-factor authentication exists because a password can be stolen and reused later - from a breach dump, a keylogger, or a password reused on a site that leaked. Any second factor breaks that: knowing the password a month from now is no longer enough. All the common options - SMS codes, TOTP apps, push approvals, hardware keys - do that much. What they differ on is a second attack: **real-time relay**. The attacker does not need your password for later; they need a session *now*. A maintainer receives a message about an urgent policy change, a takedown notice, or a security alert, linking to a page that looks exactly like the registry's login on a domain that reads almost right. That page is a proxy. Everything typed into it is forwarded live to the real registry, and everything the real registry sends back is rendered to the victim. This is adversary-in-the-middle phishing, and it defeats every factor whose output is a value a human copies. - **SMS**: the code is a value. It is also deliverable to whoever controls the phone number, which a SIM swap or a persuasive call to carrier support can change without touching any of the maintainer's devices. - **TOTP**: the code is a value, derived from a shared secret and a clock. Its short validity window is not a defence - a proxy uses it within seconds. The shared secret is also copyable at enrolment and often ends up backed up somewhere convenient. - **Push approval**: the "value" is a tap. The proxy triggers the real login, the real push arrives, and a maintainer who is in the middle of logging in approves it. Prompt-fatigue spam is the cruder version of the same trick. ## Why a passkey is different in kind A passkey is a WebAuthn/FIDO2 credential: a key pair created by an authenticator - a hardware key, a phone, or a platform secure element - and registered against a specific **relying-party ID**, essentially the registry's domain. Authentication is not a code; it is a signature over a challenge the server sent, and the browser will only ask the authenticator to sign for the origin the credential was bound to. Two consequences follow: 1. **Origin binding.** A lookalike domain is a different relying-party ID. The browser will not offer the registry's credential to it, so the proxy has nothing to relay. The maintainer cannot make the mistake, which is the whole point: the control does not depend on a tired human noticing one wrong character in a hostname. 2. **Nothing transferable exists.** There is no code on screen, no secret to read aloud to a "support agent", nothing to paste. The private key never leaves the authenticator, so even a compromised session cannot exfiltrate a reusable factor. That is what *phishing-resistant* means: not "harder to phish", but "the credential is structurally unusable on the wrong site". ## The parts a passkey does not cover Enrolling one and declaring the account safe is the common mistake. - **Recovery becomes the weakest path.** Recovery codes, a backup email address, or a support-driven reset can bypass the key entirely. Harden the mailbox with the same class of factor, keep recovery codes offline, and enroll a *second* key so that losing one does not force you down the recovery route. - **Automation credentials usually bypass interactive login altogether.** A long-lived publishing token used by a release job publishes with no second factor at all, because there is no human in the loop to challenge. Account hardening and credential scoping are separate problems, and solving one does not touch the other. - **Registry requirements often apply only above a popularity threshold.** A package can be installed enormously often as a transitive dependency while sitting below whatever bar triggers a mandatory-second-factor rule. - **One account is still one account.** The strongest factor on a sole personal owner still leaves a bus factor of one: nobody else can revoke, publish a fix, or respond if that person is unreachable. ## How to say this in an interview Frame it as a property rather than a product. For a publishing identity you want a factor that is **bound to an origin and produces no transferable value**, because the realistic attack is a live proxy rather than offline password reuse. Then name the residual paths - recovery, machine tokens, and sole ownership - because that is what separates someone who has read a policy page from someone who has actually hardened an account.

  • If the registry supports passkeys, is the package now safe from an unauthorized publish?
    No. Account login is only one route to a release. Long-lived publishing tokens used by automation publish with no interactive challenge at all, so they are hardened separately by scoping and rotation. Account recovery is another route. And a single owner with a perfect factor still means nobody else can revoke or ship a fix.
  • What do you harden immediately after enrolling a passkey on a publishing account?
    The recovery path, because it is now the weakest link. Store recovery codes offline rather than in the same mailbox, enroll a second key so a lost device does not force a recovery flow, and protect the account's registered email address with the same class of factor - otherwise the mailbox becomes the real credential.
  • Why does a registry rule requiring strong factors only on popular packages leave a gap?
    Popularity thresholds are measured on direct download counts and they lag. A package can cross into heavy transitive use long before it trips the threshold, and a small direct package pulled in by one popular one is installed just as widely. The threshold protects the packages that already have attention, not the ones that quietly acquired dependents.

A TOTP code is a password that expires quickly; a passkey is a key cut for one specific lock, which simply will not turn in a convincing copy of the door.

saying these in an interview costs you the question

  • Says SMS is fine because it is still two factors
  • Claims a TOTP code cannot be phished because it expires
  • Thinks a password manager removes the need for a second factor
  • Assumes account MFA also covers automated publishes from CI
  • Treats phishing resistance as user training rather than a credential property

context

open as a page

What is trusted publishing on a package registry, and how does it differ from a long-lived API token?

level: juniorimportance: must knowfreq 63%

basics

~20 s

Trusted publishing lets a registry accept a release from one specific CI workflow by verifying a short-lived OIDC identity token, instead of a long-lived API token stored as a CI secret. No reusable credential exists to steal.

open as a page

What does deprecating a published npm version do, and how does that differ from unpublishing it?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Deprecating leaves the version fully installable and only attaches a message the registry shows at install time. Unpublishing removes the version so it can no longer be downloaded. One is a signal, the other is a withdrawal.

open as a page

When you publish a security advisory for your own library, what must it state about affected and fixed versions?

level: juniorimportance: must knowfreq 40%

basics

~20 s

Name the package identity in its ecosystem, the version where the vulnerable code was introduced, and the first fixed version on every release line you maintain. Ranges must be structured data, not prose like 'all earlier versions'.

open as a page

What is coordinated vulnerability disclosure, and how does it differ from full disclosure?

level: juniorimportance: must knowfreq 66%

basics

~20 s

Coordinated disclosure means the finder reports privately and gives the maintainer an agreed window to ship a fix before details go public. That window is the embargo. Full disclosure publishes the details straight away, with no window.

open as a page

Why is fixing a reported security bug in a normal public pull request a disclosure?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Because the patch describes the bug. A public diff, its commit message, linked issue and new test show an attacker exactly what was broken and how to trigger it, while every user is still running the unfixed version.

open as a page

A publish token for your package registry leaked publicly — why isn't revoking it enough?

level: juniorimportance: must knowfreq 72%

basics

~20 s

Revoking stops future publishes but changes nothing about what already went out. Anything published while the token was valid sits in consumers' caches and lockfiles, released under your name. You still have to find those versions, distrust them, and tell users.

open as a page

Why is deleting a malicious dependency and reinstalling not a complete response?

level: juniorimportance: must knowfreq 72%

basics

~20 s

Because the package already ran code on every machine that installed it. Removing it only changes what the next install resolves. Treat those environments as compromised: rotate every credential they could read, and rebuild what they built.

open as a page

How do you negotiate an embargo window with a reporter, and what happens when it expires?

level: middleimportance: must knowfreq 55%

basics

~20 s

Agree a specific calendar date early, justified by real engineering work rather than convenience. When the window expires the reporter is free to publish whatever they have, fix or no fix, so an unagreed overrun becomes full disclosure.

open as a page

In a vulnerability disclosure policy, what does a safe harbour clause actually promise a researcher?

level: middleimportance: must knowfreq 64%

basics

~10 s

Safe harbour authorises the testing described in the policy and promises the publisher will not pursue legal action over good-faith, in-scope research. It cannot bind prosecutors, other customers, or your own service providers.

open as a page

Five releases went out under your identity the week your publishing service was breached — which do consumers distrust?

level: seniorimportance: must knowfreq 52%

basics

~20 s

All five, until evidence from outside the compromised credential clears them. Signatures prove the credential signed, not who authored the content, so every release verifies. Default to the whole window from your last corroborated release to the cutoff, and narrow it only with independent proof.

open as a page

After a malicious dependency version lands, do you freeze the lockfile, pin around it, or roll forward?

level: seniorimportance: must knowfreq 54%

basics

~20 s

Usually all three in order: freeze to stop further drift, pin or override the bad transitive package as the interim fix, then roll forward to a version you can justify trusting. Order by what is fastest to undo.

open as a page

What is an RFC 9116 security.txt file, and where must it be served?

level: juniorimportance: should knowfreq 52%

basics

~20 s

security.txt is a plain-text file, standardised by RFC 9116, that tells a researcher how to report a vulnerability to you. Serve it over HTTPS at /.well-known/security.txt with at least one Contact URI and an Expires date.

open as a page

Why move a widely used package's ownership from one personal account to an organization?

level: middleimportance: should knowfreq 52%

basics

~10 s

A single personal account is both the availability risk and the compromise risk: nobody else can publish a fix, and one takeover owns the name. An organization spreads publishing across separately revocable identities.

open as a page

When a CI workflow publishes via trusted publishing, what does the registry actually verify?

level: middleimportance: should knowfreq 48%

basics

~20 s

The registry validates the OIDC token's signature against the issuer's keys, checks the audience names this registry, and matches the run's repository and workflow claims against the publisher a project owner registered. Only then is a package-scoped token minted.

open as a page

A crate version is yanked from crates.io after a bad release — what does yanking promise, and what does it not do?

level: middleimportance: should knowfreq 50%

basics

~20 s

Yanking stops the version being chosen by any new dependency resolution, but it deletes nothing: the files stay downloadable, projects that already pin it keep building, and nobody is notified. It prevents new adoption; it is not a recall.

open as a page

How precise should an advisory's affected range be when the flaw needs an optional feature enabled?

level: middleimportance: should knowfreq 45%

basics

~20 s

A version range answers 'which builds contain the vulnerable code', not 'who can be hurt by it'. Keep it accurate to the code, and put the configuration precondition in the advisory text and structured fields beside the range.

open as a page

How do you prepare an embargoed security fix without the public repository revealing it?

level: middleimportance: should knowfreq 44%

basics

~20 s

Develop it out of public view: a private fork with a per-issue access list, branched from the released tag, landing as one squashed commit with a neutral message and a test that proves the fix without shipping a payload.

open as a page

A version published under your stolen registry credential is already installed downstream — how do you reach those installers?

level: middleimportance: should knowfreq 45%

basics

~20 s

There is no consumer list to reach — a registry gives download counts, not identities. The only channel that reaches machines is the ecosystem's advisory feed, which flows into the scanners and update bots consumers already run. Everything else reaches humans who happen to be watching.

open as a page

How do you determine which systems actually ran a malicious dependency version?

level: middleimportance: should knowfreq 58%

basics

~20 s

Not from the current lockfile, which describes today's intent. Reconstruct it from lockfile history across the exposure window, from the deployed inventory of running artifacts and their manifests, and from registry or caching-proxy pull records.

open as a page

How would you audit who still holds publish rights across your organization's public packages?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Build an inventory of every namespace you publish to, list the humans and the machine credentials that can publish to each, then revoke on current need rather than past contribution. Nothing expires on its own.

open as a page

After moving a release job to trusted publishing, which supply-chain attacks does it still not stop?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Trusted publishing authenticates which workflow published, not what it published. A malicious change merged to the release branch, a compromised step using the credential inside the job, or an owner re-pointing the registration all still produce a legitimate release.

open as a page

A published wheel on PyPI contained an internal API token and you deleted the file — is the credential contained?

level: seniorimportance: should knowfreq 44%

basics

~20 s

No. Treat the token as public from the moment it was published and revoke it first. Deletion never reaches mirrors, caching proxies, local caches or anyone who already downloaded the file, and the filename can never be reused.

open as a page

Your advisory's CVSS base score assumes an authenticated admin, but a consumer recomputes it far higher. Who is right?

level: seniorimportance: should knowfreq 52%

basics

~20 s

Both can be right. A base score is only as good as its trust-boundary assumptions, so publish the full vector and name the configuration you scored; a consumer whose product self-serves that admin role will legitimately score it higher.

open as a page

Embargoed details leak from a distributor on day four. Do you publish immediately?

level: seniorimportance: should knowfreq 37%

basics

~20 s

Usually yes. An embargo is only worth keeping while the details are secret; once they circulate, holding protects the attackers' head start and nobody else. Confirm what leaked, tell every embargoed party the date has moved, then publish.

open as a page

Eleven downstream distributors want pre-notification of an embargoed flaw. How do you decide who gets it?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Pre-notify only parties who must rebuild and re-ship the affected code so their own users are protected on publication day. Operators who merely deploy it can wait for the advisory. Every extra recipient raises leak risk.

open as a page

When shipping an embargoed security fix, how do you sequence release and advisory?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Publish the fixed artifact first, confirm consumers can actually fetch it, then make the fix public: advisory, commits, tag and notes together. Audit everything the release automation triggers, because a docs or notes job can announce the fix hours early.

open as a page

Your VDP covers a multi-tenant B2B analytics product: how do you scope tenant-isolation testing?

level: seniorimportance: should knowfreq 41%

basics

~10 s

Authorise isolation testing only between tenants the researcher controls: let them self-register a second trial account and probe across their own two. Real customer data stays out of scope, with an explicit stop-and-report rule.

open as a page

Which credentials do you rotate first after a malicious build plugin ran on your CI runners?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Anything that lets an attacker back in or ship code: deploy roles, publish and registry tokens, signing keys. Then data-plane credentials ranked by what they reach. Rotation alone is not remediation — also audit what the stolen credentials already did.

open as a page

You are inheriting an abandoned package's publishing rights. What do you owe its existing users?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

A change of publishing hands is a change of trust that lockfiles cannot see. You owe a public, attributable statement of the handover, an unchanged verification path, and a deliberately boring first release with no new behaviour or dependencies.

open as a page

showing 1–30 of 37