You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(github): scope 2FA check to selected repos' orgs only
The 2FA check was iterating every org returned by /user/orgs, which
included orgs the connected user happened to belong to but the customer
never selected. eighteenlabs saw findings for sisoputnfrba and dds-utn
(personal orgs of the connecting account) alongside their own org.
Derive the orgs to check from ctx.variables.target_repos instead — the
same selection the user already configures in the integration UI. Drop
the /user/orgs call entirely. The user-selected list is already filtered
to Organization-owned repos by targetReposVariable.fetchOptions.
Reverts the silent 422 skip from b5f9f3d: now that the org list comes
from explicit user selection, a 422 means the customer selected a repo
in an org they don't own — that's a real misconfiguration and should
surface as a finding.
Fixes CS-259
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
description: `GitHub user @${member.login} in the ${org.login} organization does not have two-factor authentication enabled.`,
211
+
description: `GitHub user @${member.login} in the ${orgLogin} organization does not have two-factor authentication enabled.`,
205
212
resourceType: 'user',
206
-
resourceId: `${org.login}/${member.login}`,
213
+
resourceId: `${orgLogin}/${member.login}`,
207
214
severity: 'high',
208
-
remediation: `Ask @${member.login} to enable 2FA in their GitHub account settings (Settings > Password and authentication > Two-factor authentication). Alternatively, enforce 2FA at the organization level in ${org.login}'s settings.`,
215
+
remediation: `Ask @${member.login} to enable 2FA in their GitHub account settings (Settings > Password and authentication > Two-factor authentication). Alternatively, enforce 2FA at the organization level in ${orgLogin}'s settings.`,
title: `${without2FACount} member(s) without 2FA in ${org.login}`,
222
-
description: `${without2FACount} member(s) in the ${org.login} organization do not have two-factor authentication enabled: ${formatUsernames(membersWithout2FA)}`,
228
+
title: `${without2FACount} member(s) without 2FA in ${orgLogin}`,
229
+
description: `${without2FACount} member(s) in the ${orgLogin} organization do not have two-factor authentication enabled: ${formatUsernames(membersWithout2FA)}`,
223
230
resourceType: 'organization',
224
-
resourceId: `${org.login}/2fa-summary`,
231
+
resourceId: `${orgLogin}/2fa-summary`,
225
232
severity: 'high',
226
-
remediation: `1. Go to https://github.com/organizations/${org.login}/settings/security\n2. Under "Authentication security", check "Require two-factor authentication for everyone"\n3. This will require all existing and future members to enable 2FA`,
233
+
remediation: `1. Go to https://github.com/organizations/${orgLogin}/settings/security\n2. Under "Authentication security", check "Require two-factor authentication for everyone"\n3. This will require all existing and future members to enable 2FA`,
0 commit comments