Skip to content

Commit 67084b9

Browse files
authored
Merge pull request #8392 from NuGet/dev
[ReleasePrep][2021.01.24]NuGetGallery of dev into master
2 parents f857dc8 + 73b9012 commit 67084b9

65 files changed

Lines changed: 1503 additions & 318 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<add key="automatic" value="True" />
99
</packageRestore>
1010
<packageSources>
11+
<clear />
1112
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
1213
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
1314
</packageSources>

src/AccountDeleter/Configuration/GalleryConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public string SiteRoot
3232
public string AzureStorage_Packages_ConnectionString { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3333
public string AzureStorage_FlatContainer_ConnectionString { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3434
public string AzureStorage_Statistics_ConnectionString { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
35+
public string AzureStorage_Statistics_ConnectionString_Alternate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3536
public string AzureStorage_Uploads_ConnectionString { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3637
public string AzureStorage_Revalidation_ConnectionString { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3738
public bool AzureStorageReadAccessGeoRedundant { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 45 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/base.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ img.reserved-indicator-icon {
320320
margin-right: auto;
321321
}
322322

323+
.table-container {
324+
overflow-x: auto;
325+
}
326+
323327
.package-list {
324328
margin-top: 8px;
325329
margin-bottom: 8px;

src/Bootstrap/less/theme/page-account-settings.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
.login-account-row {
4242
padding-top: 10px;
43-
display: flex;
4443
align-items: center;
4544
justify-content: space-between;
4645
}

src/Bootstrap/less/theme/page-display-package.less

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,50 @@
6363
}
6464
}
6565

66+
.vulnerabilities-container {
67+
.vulnerabilities-expander {
68+
display: flex;
69+
justify-content: space-between;
70+
vertical-align: middle;
71+
width: 100%;
72+
73+
.vulnerabilities-expander-container {
74+
display: flex;
75+
76+
.vulnerabilities-expander-icon {
77+
position: unset;
78+
top: unset;
79+
}
80+
81+
.vulnerabilities-expander-info-right {
82+
padding-left: 15px;
83+
}
84+
}
85+
}
86+
87+
.vulnerabilities-content-container {
88+
margin-top: 15px;
89+
padding-top: 15px;
90+
border-top: 1px solid lightgray;
91+
92+
.vulnerabilities-list {
93+
border-collapse: unset;
94+
}
95+
}
96+
97+
.vulnerabilities-severity-critical {
98+
color: red
99+
}
100+
101+
.vulnerabilities-severity-high {
102+
color: red
103+
}
104+
105+
.vulnerabilities-severity-moderate {
106+
color: blue
107+
}
108+
}
109+
66110
.failed-validation-alert-list {
67111
margin-top: 15px;
68112
margin-bottom: 15px;

src/GitHubVulnerabilities2Db/Ingest/AdvisoryIngestor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ namespace GitHubVulnerabilities2Db.Ingest
1313
{
1414
public class AdvisoryIngestor : IAdvisoryIngestor
1515
{
16-
private readonly IPackageVulnerabilityService _packageVulnerabilityService;
16+
private readonly IPackageVulnerabilitiesManagementService _packageVulnerabilityService;
1717
private readonly IGitHubVersionRangeParser _gitHubVersionRangeParser;
1818

1919
public AdvisoryIngestor(
20-
IPackageVulnerabilityService packageVulnerabilityService,
20+
IPackageVulnerabilitiesManagementService packageVulnerabilityService,
2121
IGitHubVersionRangeParser gitHubVersionRangeParser)
2222
{
2323
_packageVulnerabilityService = packageVulnerabilityService ?? throw new ArgumentNullException(nameof(packageVulnerabilityService));

src/GitHubVulnerabilities2Db/Job.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ protected void ConfigureIngestionServices(ContainerBuilder containerBuilder)
6464
ConfigureGalleryServices(containerBuilder);
6565

6666
containerBuilder
67-
.RegisterType<PackageVulnerabilityService>()
68-
.As<IPackageVulnerabilityService>();
67+
.RegisterType<PackageVulnerabilitiesManagementService>()
68+
.As<IPackageVulnerabilitiesManagementService>();
6969

7070
containerBuilder
7171
.RegisterType<GitHubVersionRangeParser>()

src/NuGet.Services.Entities/Package.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Package()
2424
SymbolPackages = new HashSet<SymbolPackage>();
2525
Deprecations = new HashSet<PackageDeprecation>();
2626
AlternativeOf = new HashSet<PackageDeprecation>();
27-
Vulnerabilities = new HashSet<VulnerablePackageVersionRange>();
27+
VulnerablePackageRanges = new HashSet<VulnerablePackageVersionRange>();
2828
Listed = true;
2929
}
3030
#pragma warning restore 618
@@ -156,6 +156,18 @@ public bool HasReadMe
156156
}
157157
}
158158

159+
/// <summary>
160+
/// Signifies whether or not the embedded Readme exists
161+
/// </summary>
162+
[NotMapped]
163+
public bool HasEmbeddedReadme
164+
{
165+
get
166+
{
167+
return HasReadMe && EmbeddedReadmeType != EmbeddedReadmeFileType.Absent;
168+
}
169+
}
170+
159171
public bool RequiresLicenseAcceptance { get; set; }
160172

161173
public bool DevelopmentDependency { get; set; }
@@ -277,9 +289,9 @@ public bool HasReadMe
277289
public virtual ICollection<PackageDeprecation> AlternativeOf { get; set; }
278290

279291
/// <summary>
280-
/// Gets or sets the list of vulnerabilites that this package has.
292+
/// Gets or sets the list of vulnerable package ranges connecting this package to vulnerabilities.
281293
/// </summary>
282-
public ICollection<VulnerablePackageVersionRange> Vulnerabilities { get; set; }
294+
public ICollection<VulnerablePackageVersionRange> VulnerablePackageRanges { get; set; }
283295

284296
/// <summary>
285297
/// A flag that indicates that the package metadata had an embedded icon specified.

src/NuGetGallery.Core/Entities/EntitiesContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
482482
modelBuilder.Entity<VulnerablePackageVersionRange>()
483483
.HasKey(pv => pv.Key)
484484
.HasMany(pv => pv.Packages)
485-
.WithMany(p => p.Vulnerabilities);
485+
.WithMany(p => p.VulnerablePackageRanges);
486486

487487
modelBuilder.Entity<VulnerablePackageVersionRange>()
488488
.HasIndex(pv => pv.PackageId);

0 commit comments

Comments
 (0)