Skip to content

Commit 41e81ca

Browse files
committed
Combine licenses with ecosytems
We now have a single component for packages, licenses and vulns. Also fix some links. Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
1 parent 3de43b5 commit 41e81ca

5 files changed

Lines changed: 95 additions & 241 deletions

File tree

website/src/components/EcosystemGrid/index.js

Lines changed: 87 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,84 @@ import React from 'react';
22
import useBaseUrl from '@docusaurus/useBaseUrl';
33
import styles from './styles.module.css';
44

5+
// Display grids of icons for packages, licenses and vulnerabilities
6+
7+
8+
const licenses = [
9+
{ label: 'MIT', logo: 'img/logos/lic-mit.svg', url: 'https://scancode-licensedb.aboutcode.org/mit.html' },
10+
{ label: 'Apache-2.0', logo: 'img/logos/apache.svg', url: 'https://scancode-licensedb.aboutcode.org/apache-2.0.html' },
11+
{ label: 'GPL-2.0', logo: 'img/logos/gnu.svg', url: 'https://scancode-licensedb.aboutcode.org/gpl-2.0.html' },
12+
{ label: 'GPL-3.0', logo: 'img/logos/gpl.svg', url: 'https://scancode-licensedb.aboutcode.org/gpl-3.0.html' },
13+
{ label: 'BSD-2-Clause', logo: 'img/logos/berkeley.svg', url: 'https://scancode-licensedb.aboutcode.org/bsd-simplified.html' },
14+
{ label: 'BSD-3-Clause', logo: 'img/logos/berkeley.svg', url: 'https://scancode-licensedb.aboutcode.org/bsd-new.html' },
15+
{ label: 'LGPL-2.0', logo: 'img/logos/gnu.svg', url: 'https://scancode-licensedb.aboutcode.org/lgpl-2.0.html' },
16+
{ label: 'LGPL-2.1', logo: 'img/logos/gnu.svg', url: 'https://scancode-licensedb.aboutcode.org/lgpl-2.1.html' },
17+
{ label: 'LGPL-3.0', logo: 'img/logos/gpl.svg', url: 'https://scancode-licensedb.aboutcode.org/lgpl-3.0.html' },
18+
{ label: 'MPL-2.0', logo: 'img/logos/mozilla.svg', url: 'https://scancode-licensedb.aboutcode.org/mpl-2.0.html' },
19+
{ label: 'ISC', logo: 'img/logos/lic-isc.svg', url: 'https://scancode-licensedb.aboutcode.org/isc.html' },
20+
{ label: 'CC-BY-4.0', logo: 'img/logos/cc.svg', url: 'https://scancode-licensedb.aboutcode.org/cc-by-4.0.html' },
21+
{ label: 'AGPL-3.0', logo: 'img/logos/gpl.svg', url: 'https://scancode-licensedb.aboutcode.org/agpl-3.0.html' },
22+
{ label: 'Artistic-2.0', logo: 'img/logos/perl-camel.png', url: 'https://scancode-licensedb.aboutcode.org/artistic-2.0.html' },
23+
{ label: 'EPL-2.0', logo: 'img/logos/eclipse-logo.svg', url: 'https://scancode-licensedb.aboutcode.org/epl-2.0.html' },
24+
{ label: 'CDDL-1.0', logo: 'img/logos/lic-cddl.svg', url: 'https://scancode-licensedb.aboutcode.org/cddl-1.0.html' },
25+
{ label: 'Unlicense', logo: 'img/logos/lic-unlicense.svg', url: 'https://scancode-licensedb.aboutcode.org/unlicense.html' },
26+
{ label: 'Zlib', logo: 'img/logos/lic-zlib.svg', url: 'https://scancode-licensedb.aboutcode.org/zlib.html' },
27+
];
28+
529
const ecosystems = [
6-
{ label: 'Alpine', logo: 'img/logos/apk.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/apk-definition' },
30+
{ label: 'Alpine', logo: 'img/logos/apk.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/apk-definition.md' },
731
{ label: 'Android', logo: 'img/logos/android.svg', url: 'https://developer.android.com' },
8-
{ label: 'Arch Linux', logo: 'img/logos/alpm.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/alpm-definition', logoClass: 'logoXL' },
9-
{ label: 'Bazel', logo: 'img/logos/bazel.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/bazel-definition' },
10-
{ label: 'Bitbucket', logo: 'img/logos/bitbucket.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/bitbucket-definition' },
11-
{ label: 'Bitnami', logo: 'img/logos/bitnami.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/bitnami-definition' },
32+
{ label: 'Arch Linux', logo: 'img/logos/alpm.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/alpm-definition.md', logoClass: 'logoXL' },
33+
{ label: 'Bazel', logo: 'img/logos/bazel.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/bazel-definition.md' },
34+
{ label: 'Bitbucket', logo: 'img/logos/bitbucket.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/bitbucket-definition.md' },
35+
{ label: 'Bitnami', logo: 'img/logos/bitnami.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/bitnami-definition.md' },
1236
{ label: 'Bower', logo: 'img/logos/bower.png', url: 'https://bower.io' },
13-
{ label: 'Cargo', logo: 'img/logos/cargo.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/cargo-definition' },
37+
{ label: 'Cargo', logo: 'img/logos/cargo.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/cargo-definition.md' },
1438
{ label: 'Chef', logo: 'img/logos/chef.png', url: 'https://www.chef.io', logoClass: 'logoLarge' },
15-
{ label: 'Chrome Extension', logo: 'img/logos/chrome.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/chrome-extension-definition' },
16-
{ label: 'CocoaPods', logo: 'img/logos/cocoapods.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/cocoapods-definition' },
17-
{ label: 'Composer', logo: 'img/logos/composer.jpg', url: 'https://packageurl.org/docs/purl-spec/types-doc/composer-definition' },
18-
{ label: 'Conan', logo: 'img/logos/conan.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/conan-definition' },
19-
{ label: 'Conda', logo: 'img/logos/conda.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/conda-definition' },
20-
{ label: 'CPAN', logo: 'img/logos/cpan.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/cpan-definition', logoClass: 'logoLarge' },
21-
{ label: 'CRAN', logo: 'img/logos/cran.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/cran-definition' },
22-
{ label: 'Debian / Ubuntu', logo: 'img/logos/deb.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/deb-definition' },
23-
{ label: 'Docker', logo: 'img/logos/docker.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/docker-definition' },
39+
{ label: 'Chrome Extension', logo: 'img/logos/chrome.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/chrome-extension-definition.md' },
40+
{ label: 'CocoaPods', logo: 'img/logos/cocoapods.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/cocoapods-definition.md' },
41+
{ label: 'Composer', logo: 'img/logos/composer.jpg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/composer-definition.md' },
42+
{ label: 'Conan', logo: 'img/logos/conan.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/conan-definition.md' },
43+
{ label: 'Conda', logo: 'img/logos/conda.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/conda-definition.md' },
44+
{ label: 'CPAN', logo: 'img/logos/cpan.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/cpan-definition.md', logoClass: 'logoLarge' },
45+
{ label: 'CRAN', logo: 'img/logos/cran.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/cran-definition.md' },
46+
{ label: 'Debian / Ubuntu', logo: 'img/logos/deb.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/deb-definition.md' },
47+
{ label: 'Docker', logo: 'img/logos/docker.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/docker-definition.md' },
2448
{ label: 'F-Droid', logo: 'img/logos/fdroid.png', url: 'https://f-droid.org' },
2549
{ label: 'Fedora', logo: 'img/logos/fedora.svg', url: 'https://packages.fedoraproject.org' },
2650
{ label: 'FreeBSD', logo: 'img/logos/freebsd.png', url: 'https://www.freebsd.org/ports/', logoClass: 'logoLarge' },
2751
{ label: 'Gentoo', logo: 'img/logos/gentoo.png', url: 'https://packages.gentoo.org' },
28-
{ label: 'GitHub', logo: 'img/logos/github.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/github-definition' },
52+
{ label: 'GitHub', logo: 'img/logos/github.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/github-definition.md' },
2953
{ label: 'GitLab', logo: 'img/logos/gitlab.png', url: 'https://gitlab.com', logoClass: 'logoLarge' },
30-
{ label: 'Hackage', logo: 'img/logos/hackage.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/hackage-definition' },
31-
{ label: 'Hex', logo: 'img/logos/hex.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/hex-definition' },
32-
{ label: 'Hugging Face', logo: 'img/logos/huggingface.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/huggingface-definition' },
33-
{ label: 'Julia', logo: 'img/logos/julia.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/julia-definition' },
34-
{ label: 'LuaRocks', logo: 'img/logos/luarocks.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/luarocks-definition' },
35-
{ label: 'Maven', logo: 'img/logos/maven.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/maven-definition' },
36-
{ label: 'MLflow', logo: 'img/logos/mlflow.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/mlflow-definition' },
37-
{ label: 'npm', logo: 'img/logos/npm.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/npm-definition' },
38-
{ label: 'NuGet', logo: 'img/logos/nuget.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/nuget-definition' },
39-
{ label: 'OCI', logo: 'img/logos/oci.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/oci-definition' },
40-
{ label: 'opam', logo: 'img/logos/opam.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/opam-definition', logoClass: 'logoLarge' },
54+
{ label: 'Hackage', logo: 'img/logos/hackage.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/hackage-definition.md' },
55+
{ label: 'Hex', logo: 'img/logos/hex.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/hex-definition.md' },
56+
{ label: 'Hugging Face', logo: 'img/logos/huggingface.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/huggingface-definition.md' },
57+
{ label: 'Julia', logo: 'img/logos/julia.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/julia-definition.md' },
58+
{ label: 'LuaRocks', logo: 'img/logos/luarocks.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/luarocks-definition.md' },
59+
{ label: 'Maven', logo: 'img/logos/maven.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/maven-definition.md' },
60+
{ label: 'MLflow', logo: 'img/logos/mlflow.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/mlflow-definition.md' },
61+
{ label: 'npm', logo: 'img/logos/npm.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/npm-definition.md' },
62+
{ label: 'NuGet', logo: 'img/logos/nuget.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/nuget-definition.md' },
63+
{ label: 'OCI', logo: 'img/logos/oci.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/oci-definition.md' },
64+
{ label: 'opam', logo: 'img/logos/opam.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/opam-definition.md', logoClass: 'logoLarge' },
4165
{ label: 'OpenWrt', logo: 'img/logos/openwrt.png', url: 'https://openwrt.org', logoClass: 'logoLarge' },
42-
{ label: 'OTP', logo: 'img/logos/otp.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/otp-definition' },
43-
{ label: 'Pub', logo: 'img/logos/pub.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/pub-definition' },
44-
{ label: 'PyPI', logo: 'img/logos/pypi.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/pypi-definition' },
45-
{ label: 'QNX QPKG', logo: 'img/logos/qnap.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/qpkg-definition', logoClass: 'logoWideLarge' },
46-
{ label: 'RPM', logo: 'img/logos/rpm.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/rpm-definition', logoClass: 'logoLarge' },
47-
{ label: 'RubyGems', logo: 'img/logos/gem.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/gem-definition' },
48-
{ label: 'Swift', logo: 'img/logos/swift.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/swift-definition' },
49-
{ label: 'VS Code Extension', logo: 'img/logos/vscode.svg', url: 'https://packageurl.org/docs/purl-spec/types-doc/vscode-extension-definition' },
50-
{ label: 'Yocto', logo: 'img/logos/yocto.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/yocto-definition', logoClass: 'logoWideLarge' },
66+
{ label: 'OTP', logo: 'img/logos/otp.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/otp-definition.md' },
67+
{ label: 'Pub', logo: 'img/logos/pub.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/pub-definition.md' },
68+
{ label: 'PyPI', logo: 'img/logos/pypi.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/pypi-definition.md' },
69+
{ label: 'QNX QPKG', logo: 'img/logos/qnap.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/qpkg-definition.md', logoClass: 'logoWideLarge' },
70+
{ label: 'RPM', logo: 'img/logos/rpm.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/rpm-definition.md', logoClass: 'logoLarge' },
71+
{ label: 'RubyGems', logo: 'img/logos/gem.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/gem-definition.md' },
72+
{ label: 'Swift', logo: 'img/logos/swift.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/swift-definition.md' },
73+
{ label: 'VS Code Extension', logo: 'img/logos/vscode.svg', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/vscode-extension-definition.md' },
74+
{ label: 'Yocto', logo: 'img/logos/yocto.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/yocto-definition.md', logoClass: 'logoWideLarge' },
5175
{ label: 'Autotools', logo: 'img/logos/autotools.svg', url: 'https://www.gnu.org/software/automake/' },
5276
{ label: 'Bash/Shell', logo: 'img/logos/bash.svg', url: 'https://www.gnu.org/software/bash/' },
5377
{ label: 'C', logo: 'img/logos/c-lang.svg', url: 'https://en.cppreference.com/w/c' },
5478
{ label: 'C#', logo: 'img/logos/csharp.svg', url: 'https://learn.microsoft.com/en-us/dotnet/csharp/' },
5579
{ label: 'C++', logo: 'img/logos/cpp.svg', url: 'https://isocpp.org' },
5680
{ label: 'Dart', logo: 'img/logos/dart.png', url: 'https://dart.dev' },
5781
{ label: '.NET', logo: 'img/logos/dotnet.svg', url: 'https://dotnet.microsoft.com' },
58-
{ label: 'Go', logo: 'img/logos/golang.png', url: 'https://packageurl.org/docs/purl-spec/types-doc/golang-definition' },
82+
{ label: 'Go', logo: 'img/logos/golang.png', url: 'https://github.com/package-url/purl-spec/blob/main/types-doc/golang-definition.md' },
5983
{ label: 'Haxe', logo: 'img/logos/haxe.svg', url: 'https://lib.haxe.org' },
6084
{ label: 'HTML/CSS', logo: 'img/logos/html-css.svg', url: 'https://developer.mozilla.org/en-US/docs/Web', logoClass: 'logoWideLarge' },
6185
{ label: 'iOS', logo: 'img/logos/ios.svg', url: 'https://developer.apple.com/ios/' },
@@ -120,6 +144,7 @@ const vulnSources = [
120144
{ label: 'Xen', logo: 'img/logos/xen.svg', url: 'https://xenbits.xen.org/xsa/', logoClass: 'logoLarge' },
121145
];
122146

147+
123148
function GridItem({ item }) {
124149
const logoSrc = useBaseUrl(`/${item.logo}`);
125150
return (
@@ -144,15 +169,16 @@ function GridItem({ item }) {
144169
);
145170
}
146171

147-
function GridSection({ id, title, items, headerLink }) {
172+
function GridSection({ id, title, items, header_link, intro }) {
148173
return (
149174
<div id={id} className={styles.section}>
150175
<h3 className={styles.sectionTitle}>
151176
{title}
152-
{headerLink && (
153-
<>{' - '}<a href={headerLink.url} className={styles.headerLink}>{headerLink.label}...</a></>
177+
{header_link && (
178+
<>{' - '}<a href={header_link.url} className={styles.header_link}>{header_link.label}...</a></>
154179
)}
155180
</h3>
181+
{intro && <div className={styles.intro}>{intro}</div>}
156182
<div className={styles.grid}>
157183
{items.map((item) => (
158184
<GridItem key={item.label} item={item} />
@@ -165,8 +191,27 @@ function GridSection({ id, title, items, headerLink }) {
165191
export default function EcosystemGrid() {
166192
return (
167193
<div className={styles.gridWrapper}>
168-
<GridSection id="pkg-ecosystems" title="Package ecosystems and programming languages" items={ecosystems} headerLink={{ label: 'Getting started', url: '/docs/getting_started/getting_started-software-identification/' }} />
169-
<GridSection id="vuln-sources" title="Vulnerability data sources" items={vulnSources} headerLink={{ label: 'Getting started', url: '/docs/getting_started/getting_started-security/' }} />
194+
<GridSection
195+
id="licensing"
196+
title="Licensing data"
197+
items={licenses}
198+
header_link={{ label: 'Getting started', url: '/docs/getting_started/getting_started-compliance/' }}
199+
intro={<p>The ScanCode LicenseDB contains 2,500+ curated licenses across 12 categories. Browse all <a href="https://scancode-licensedb.aboutcode.org" target="_blank" rel="noopener noreferrer">2,500+ licenses</a> in the LicenseDB. Industry-leading license detection is backed by <a href="https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules" target="_blank" rel="noopener noreferrer">over 35,000 license notices</a> used as detection rules.</p>}
200+
/>
201+
<GridSection
202+
id="pkg-ecosystems"
203+
title="Package ecosystems and programming languages"
204+
items={ecosystems}
205+
header_link={{ label: 'Getting started', url: '/docs/getting_started/getting_started-software-identification/' }}
206+
intro={<p>The AboutCode package database and scanners track million of packages over 70 package ecosystems and programming languages. </p>}
207+
/>
208+
<GridSection
209+
id="vuln-sources"
210+
title="Vulnerability data sources"
211+
items={vulnSources}
212+
header_link={{ label: 'Getting started', url: '/docs/getting_started/getting_started-security/' }}
213+
intro={<p>AboutCode collects, correlates, and improves vulnerabilities from over 50 data sources, privileging upstream data. </p>}
214+
/>
170215
</div>
171216
);
172217
}

website/src/components/EcosystemGrid/styles.module.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
margin-bottom: 0.75rem;
1616
}
1717

18+
.intro {
19+
margin-bottom: 0.75rem;
20+
font-size: 0.9rem;
21+
line-height: 1.5;
22+
}
23+
1824
.headerLink {
1925
font-size: 1rem;
2026
font-style: italic;

website/src/components/HomepageContent/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import Supporters from './Supporters.md';
88
import ValuePillars from '@site/src/components/ValuePillars';
99
import CapabilitiesGrid from '@site/src/components/CapabilitiesGrid';
1010
import EcosystemGrid from '@site/src/components/EcosystemGrid';
11-
import LicenseGrid from '@site/src/components/LicenseGrid';
1211
import OpenDataSection from '@site/src/components/OpenDataSection';
1312
import ProjectGridTemplate from '@site/src/components/ProjectGridTemplate';
1413
import { featuredProjectSources } from '@site/src/data/projects-featured';
@@ -121,13 +120,11 @@ export default function HomepageContent() {
121120
<h2>Supported ecosystems, languages, licenses, and data sources</h2>
122121
</div>
123122
<div className={styles.sectionIntro}>
124-
<p>AboutCode tools support 70+ package ecosystems, programming languages,
123+
<p>AboutCode tools support a large number of licenses, package ecosystems, programming languages,
125124
and vulnerability data sources, all identified using{' '}
126-
<a href="https://packageurl.org">Package-URL (PURL)</a>.</p>
125+
<a href="https://packageurl.org">Package-URL (PURL)</a> or SPDX license expressions.</p>
127126
</div>
128127
<EcosystemGrid />
129-
<div id="licensing" style={{ scrollMarginTop: '80px' }}></div>
130-
<LicenseGrid />
131128
</section>
132129

133130
<div style={{ marginBottom: '50px' }}></div>

0 commit comments

Comments
 (0)