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
<p class="description">Reviews Artifacts upstream sources to limit pulling from public registries and protect against dependency-confusion attacks.</p>
954
+
<p class="description">Advisory: flags feeds with active upstream sources. Upstreams are usually required; the real mitigation against dependency-confusion is to publish every internal package name to the feed at least once (save-to-feed) so the local copy always wins over public registries.</p>
955
955
<details class="steps-details">
956
956
<summary>Remediation steps</summary>
957
957
<ol>
958
-
<li>Navigate to Artifacts > select the feed.</li>
959
-
<li>Click the gear icon (Feed settings).</li>
960
-
<li>Review Upstream sources.</li>
961
-
<li>Disable unnecessary upstream sources.</li>
962
-
<li>Enable "Override packages from public sources" protection if available.</li>
958
+
<li>Decide whether each upstream (npmjs, nuget.org, Maven Central, etc.) is required. Disable any that aren't.</li>
959
+
<li>List every internal package name your org publishes.</li>
960
+
<li>Publish each internal name to the feed at least once so it's saved-to-feed.</li>
961
+
<li>For npm, use scoped package names (<code>@your-scope/...</code>).</li>
962
+
<li>Filter the feed view by <em>Saved</em> periodically to confirm internal names are present.</li>
963
+
<li>Document acceptance of FEED-03 in your remediation log once the mitigation is verified.</li>
if ($upstreamEnabled-eq$true-and$upstreamSources) {
3188
-
# Check if any upstream source lacks upstream protection
3189
3190
foreach ($srcin$upstreamSources) {
3190
-
$protocol=Get-SafeProperty$src'protocol'
3191
3191
$status=Get-SafeProperty$src'status'
3192
3192
if ($status-ne'disabled') {
3193
-
$unprotectedFeeds.Add($feed.name)
3193
+
$feedsWithUpstreams.Add($feed.name)
3194
3194
break
3195
3195
}
3196
3196
}
3197
3197
}
3198
3198
}
3199
-
if ($unprotectedFeeds.Count-eq0) {
3200
-
$results.Add((New-ControlResult-Id "FEED-03"-Status "PASS"-Severity "High"-Control "External Package Protection"-Finding "All org-level feeds have upstream sources disabled or protected."))
3199
+
if ($feedsWithUpstreams.Count-eq0) {
3200
+
$results.Add((New-ControlResult-Id "FEED-03"-Status "PASS"-Severity "Medium"-Control "External Package Protection"-Finding "No org-scoped feeds have active upstream sources."))
3201
3201
} else {
3202
-
$results.Add((New-ControlResult-Id "FEED-03"-Status "FAIL"-Severity "High"-Control "External Package Protection"-Finding "Feeds with active upstream sources: $($unprotectedFeeds-join', '). Review upstream source protection settings."))
3202
+
$results.Add((New-ControlResult-Id "FEED-03"-Status "NOT CHECKED"-Severity "Medium"-Control "External Package Protection"-Finding "Feeds with active upstream sources: $($feedsWithUpstreams-join', '). Upstreams are typically required for npm/NuGet/Maven; the dependency-confusion mitigation is to publish every internal package name to the feed at least once (save-to-feed makes the local copy win over upstream). Verify each internal package name is saved, and accept this control if the mitigation is in place."))
Steps=@('Navigate to Artifacts > select the feed.','Click the gear icon (Feed settings).','Review Upstream sources.','Disable unnecessary upstream sources.','Enable "Override packages from public sources" protection if available.')
174
+
Steps=@('Decide whether the upstreams (npmjs, nuget.org, Maven Central, etc.) are required. If not, disable them in feed Settings > Upstream sources.','If upstreams are required, apply the dependency-confusion mitigation: list every internal package name your org publishes (e.g., @contoso/utils, Contoso.Common).','Publish each internal package name to the feed at least once. Once a name is saved-to-feed, Azure Artifacts always serves the local copy and never pulls a same-named package from upstream.','For npm, use a scoped package name (@your-scope/...) so public-registry names cannot collide.','Periodically review the feed view filtered by Saved to confirm every internal name is present.','Document acceptance of FEED-03 in your remediation log once the save-to-feed mitigation is verified.','Reach the feed via any project: Artifacts > feed picker > switch to "All feeds in this organization" > select the feed > gear icon.')
0 commit comments