Join our Newsletter — 33% off our NHI Course
Home› FAQ› Authentication, Authorisation & Trust› Should teams prioritise device trust or MFA for…
Authentication, Authorisation & Trust

Should teams prioritise device trust or MFA for code repositories?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 8, 2026 Domain: Authentication, Authorisation & Trust

They should prioritise both, but device trust closes a gap that MFA does not. MFA confirms the user, while device controls help confirm the endpoint carrying that identity is acceptable for code access. In source code governance, the safest model is to require verified identity and approved devices before any sensitive change path is opened.

Why device trust matters as much as MFA for code repositories

MFA is necessary, but it only proves the person or session is legitimate at sign-in. For code repositories, the endpoint also matters because a trusted account on an unmanaged or compromised device can still leak source, tokens, signing keys, or production access paths. The practical question is not which control is “better”, but which one closes the gap the other leaves open.

That gap is why code platforms increasingly treat device posture, device certificates, or managed-device policy as part of the access decision. A developer who satisfies MFA from an untrusted laptop, a shared machine, or a browser with stolen session state still brings a risky execution environment into a sensitive change workflow.

In other words, MFA authenticates the identity claim, while device trust helps authenticate the execution context carrying that identity. For source control, that distinction matters because repository access is often an upstream path to secret exposure, code tampering, branch manipulation, and production impact.

What changes when device trust is added to MFA

Device trust adds a second gate before sensitive repository actions are allowed. That can mean requiring a managed endpoint, a healthy device certificate, compliant endpoint posture, or conditional access that blocks unknown devices from pushing code, approving changes, or reading protected branches.

For teams, the strongest model is usually layered: MFA for user proof, device trust for endpoint assurance, and repository permissions that still enforce least privilege. This is especially important where source repositories contain deployment scripts, infrastructure code, signing workflows, secrets references, or privileged automation credentials.

Device trust also helps reduce the value of stolen credentials. Attackers regularly succeed with valid logins, but if the endpoint itself must be recognised and healthy, then a phished password or intercepted MFA prompt is not automatically enough to reach the repository. That makes the attack path narrower and the alerting more meaningful.

  • Require MFA for every interactive repository sign-in.
  • Require managed or attested devices for write access to protected branches.
  • Separate read-only access from commit, merge, and release permissions.
  • Block access from browsers or endpoints that cannot prove device posture.

Risk and Threat Considerations

Repository compromise is rarely about a single control failure. The common failure mode is identity being treated as sufficient proof of trust, even when the endpoint is unmanaged, already compromised, or able to replay a session token. In a code environment, that can expose source, secrets, release pipelines, and the ability to alter trusted software.

Failure mechanism: MFA stops some credential theft, but it does not by itself tell you whether the device is healthy, enrolled, or under attacker control. If the endpoint is compromised, the attacker may use a valid session, steal tokens, or act after MFA has already succeeded.

Impact: The organisation can lose code integrity, leak sensitive credentials embedded in development workflows, or allow an attacker to modify code that later becomes part of a production release. For high-trust repositories, that is an upstream supply-chain and access-control problem, not just an authentication problem.

External guidance on phishing-resistant identity, such as NIST SP 800-63 Digital Identity Guidelines, reinforces that strong authentication should be paired with the right assurance level for the access decision. For source repositories, that often means the sign-in method and the device state both need to be acceptable before code access is opened.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, NIST SP 800-63 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-2 — Identification and Authentication (Organizational Users)Code repository access depends on strong user authentication.
IA-3 — Device Identification and AuthenticationDevice trust hinges on proving the endpoint is recognised and trusted.
AC-6 — Least PrivilegeRepo write, merge, and release permissions should be narrowly scoped.
Recommendation — Enforce IA-2 for repository sign-in before granting code access. Require IA-3 device authentication for sensitive repository actions. Apply AC-6 to limit repository write and release privileges.
NIST SP 800-63AAL2 — Authenticator Assurance Level 2MFA strength and assurance level materially affect repository access decisions.
Recommendation — Set repository access requirements to at least AAL2 where risk justifies it.
NIST CSF 2.0PR.AA-05 — Protective Technology / AuthenticationRepository sign-in and access gating are core authentication protections.
Recommendation — Use PR.AA-05 to require strong authentication for repository access.

Practitioner Guidance

What to prioritise: Start with the repository paths that can change production, publish releases, or expose secrets. Those workflows deserve device trust first because the blast radius is highest there, even if read-only access remains MFA-only.

Decision rule: If the action can alter source, approvals, or deployment artifacts, require both verified identity and approved device state. If the action is purely informational, MFA may be enough at first, but only if the session and browser controls are still monitored.

What to verify: Confirm that device trust is enforced at the repository and SSO layer, not just on paper in endpoint policy. A common mistake is to trust the device on paper while the code platform still accepts any authenticated browser session.

What practitioners underestimate: MFA fatigue and phishing get the headlines, but unmanaged endpoints often create the quieter failure path. The stronger control is the one that blocks both stolen credentials and untrusted execution environments, not the one that only improves the login screen.

Practitioner takeaway: For code repositories, MFA proves who is signing in, but device trust helps prove where that identity is coming from. The safest design treats both as mandatory for sensitive write paths.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 8, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org