Skip to content

Commit a27ccb5

Browse files
author
Gyan Ranjan Panda
committed
docs: implement persona-based documentation paths
Implements issue #250 by creating user-centric documentation paths organized around user goals rather than tools. Changes: - Add three persona landing pages: * Legal/Compliance professionals * Security/SCA professionals * Developers/Integrators - Update homepage with 'Choose Your Path' section - Fix purldb-project label reference Each persona page uses appropriate language and workflows for its target audience, with cross-links between personas where relevant. All existing documentation remains unchanged - this is an additive refactor creating new entry points. Verification: - Documentation builds with zero warnings - All link checks pass - All style checks pass Closes #250
1 parent 9d97cd9 commit a27ccb5

File tree

5 files changed

+539
-1
lines changed

5 files changed

+539
-1
lines changed

docs/source/aboutcode-projects/purldb-project.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. purldb-project:
1+
.. _purldb-project:
22

33
PurlDB
44
======

docs/source/index.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,41 @@ AboutCode documentation.
1616
All community contributions are welcome.
1717

1818

19+
----
20+
21+
******************
22+
Choose Your Path
23+
******************
24+
25+
AboutCode serves different users with different goals. Choose the path that best
26+
describes you to find the documentation most relevant to your needs:
27+
28+
**Legal & Compliance Professionals**
29+
You're responsible for ensuring license compliance, managing open source policies,
30+
or generating attribution documentation. You need high-level summaries and
31+
compliance workflows.
32+
33+
:ref:`persona-legal-compliance`
34+
35+
**Security & SCA Professionals**
36+
You're focused on identifying vulnerabilities, managing security risks, or
37+
performing software composition analysis. You need vulnerability scanning and
38+
security analysis workflows.
39+
40+
:ref:`persona-security-researcher`
41+
42+
**Developers & Integrators**
43+
You're integrating AboutCode into your development workflow, CI/CD pipeline, or
44+
building applications that consume AboutCode data. You need APIs, CLIs, and
45+
automation guides.
46+
47+
:ref:`persona-developer-integrator`
48+
49+
.. note::
50+
Not sure which path fits you? That's okay! You can explore all paths, and each
51+
one includes links to the others where relevant.
52+
53+
1954
----
2055

2156
********
@@ -27,6 +62,17 @@ Overview
2762

2863
aboutcode-project-overview
2964

65+
**************
66+
Persona Paths
67+
**************
68+
69+
.. toctree::
70+
:maxdepth: 2
71+
72+
personas/legal-compliance
73+
personas/security-researcher
74+
personas/developer-integrator
75+
3076
************
3177
Contributing
3278
************
Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
.. _persona-developer-integrator:
2+
3+
====================================
4+
For Developers & Integrators
5+
====================================
6+
7+
Welcome! If you're integrating AboutCode tools into your development workflow, CI/CD
8+
pipeline, or building applications that consume AboutCode data, you're in the right place.
9+
10+
AboutCode provides powerful APIs, command-line tools, and libraries that you can use to
11+
automate scanning, generate SBOMs, and integrate license and vulnerability analysis into
12+
your systems.
13+
14+
What You Can Accomplish
15+
=======================
16+
17+
With AboutCode, you can:
18+
19+
- **Automate Code Scanning**: Run license and vulnerability scans from the command line or CI/CD
20+
- **Generate SBOMs Programmatically**: Create CycloneDX and SPDX SBOMs via API or CLI
21+
- **Integrate with Your Tools**: Use REST APIs to query vulnerability data and package metadata
22+
- **Build Custom Workflows**: Create pipelines that combine scanning, analysis, and reporting
23+
- **Parse and Process Results**: Work with structured JSON/YAML output for downstream processing
24+
25+
Key Workflows
26+
=============
27+
28+
1. Command-Line Scanning
29+
------------------------
30+
31+
Use ScanCode Toolkit from the command line to scan code, detect licenses, extract
32+
copyrights, and identify packages.
33+
34+
The CLI provides extensive options for customizing scans, filtering results, and
35+
generating output in various formats (JSON, YAML, SPDX, CycloneDX).
36+
37+
**Example:**
38+
39+
.. code-block:: bash
40+
41+
# Basic scan
42+
scancode -clpieu --json-pp output.json /path/to/code
43+
44+
# Scan with license policies
45+
scancode --license-policy policies.yml --json output.json /path/to/code
46+
47+
# Generate SPDX SBOM
48+
scancode --spdx output.spdx /path/to/code
49+
50+
**Learn more:** :ref:`scancode-toolkit-project`
51+
52+
**Tools you'll use:** ScanCode Toolkit
53+
54+
2. API Integration
55+
------------------
56+
57+
ScanCode.io provides a REST API for triggering scans, retrieving results, and managing
58+
projects programmatically.
59+
60+
You can integrate scanning into your CI/CD pipeline, automate SBOM generation, or build
61+
custom applications that consume scan data.
62+
63+
**Example:**
64+
65+
.. code-block:: python
66+
67+
import requests
68+
69+
# Create a project
70+
response = requests.post(
71+
'https://your-scancodeio.com/api/projects/',
72+
json={'name': 'my-project'},
73+
headers={'Authorization': 'Token your-api-token'}
74+
)
75+
76+
# Upload code and run pipeline
77+
project_url = response.json()['url']
78+
# ... upload files and trigger pipeline
79+
80+
**Learn more:** :ref:`scancodeio-project`
81+
82+
**Tools you'll use:** ScanCode.io API, VulnerableCode API, PurlDB API
83+
84+
3. CI/CD Pipeline Integration
85+
-----------------------------
86+
87+
Integrate AboutCode scanning into your continuous integration pipeline to catch license
88+
and security issues early in the development process.
89+
90+
You can use GitHub Actions, GitLab CI, Jenkins, or any CI system that supports running
91+
command-line tools or making API calls.
92+
93+
**Example (GitHub Actions):**
94+
95+
.. code-block:: yaml
96+
97+
- name: Scan with ScanCode
98+
uses: aboutcode-org/scancode-action@v1
99+
with:
100+
path: .
101+
output: scancode-results.json
102+
103+
**Learn more:** :ref:`scancode-action-project`
104+
105+
**Tools you'll use:** ScanCode Action, ScanCode Toolkit, ScanCode.io
106+
107+
4. Creating and Consuming SBOMs
108+
-------------------------------
109+
110+
Generate software bills of materials (SBOMs) in industry-standard formats like SPDX
111+
and CycloneDX.
112+
113+
You can create SBOMs from scan results, import SBOMs from other tools, enrich them with
114+
additional data, and export them for sharing with customers or partners.
115+
116+
**Learn more:** :ref:`create-sboms` and :ref:`consume-sboms`
117+
118+
**Tools you'll use:** ScanCode Toolkit, ScanCode.io, DejaCode
119+
120+
Recommended Tools & Libraries
121+
==============================
122+
123+
**ScanCode Toolkit**
124+
Command-line scanner with extensive options and multiple output formats. The
125+
foundation for all AboutCode scanning.
126+
127+
:ref:`scancode-toolkit-project`
128+
129+
GitHub: https://github.com/aboutcode-org/scancode-toolkit
130+
131+
**ScanCode.io**
132+
Web application with REST API for running complex scanning pipelines. Supports
133+
Docker images, packages, and codebases.
134+
135+
:ref:`scancodeio-project`
136+
137+
GitHub: https://github.com/aboutcode-org/scancode.io
138+
139+
**VulnerableCode API**
140+
REST API for querying vulnerability data by package, CVE, or PURL.
141+
142+
:ref:`vulnerablecode-project`
143+
144+
Public API: https://public.vulnerablecode.io/api/
145+
146+
**PurlDB API**
147+
REST API for querying package metadata by PURL.
148+
149+
https://purldb.readthedocs.io
150+
151+
Public API: https://public.purldb.io/api/
152+
153+
**Python Libraries**
154+
- **license-expression**: Parse and normalize SPDX license expressions
155+
- **packageurl-python**: Work with Package URLs (PURLs)
156+
- **commoncode**: Common utilities for file handling, hashing, and dates
157+
- **extractcode**: Universal archive extraction
158+
159+
:ref:`license-expression-project`
160+
161+
Working with Package URLs (PURLs)
162+
==================================
163+
164+
Package URLs (PURLs) are a universal way to identify software packages across all
165+
ecosystems. AboutCode tools use PURLs extensively.
166+
167+
**Format:**
168+
169+
.. code-block:: text
170+
171+
pkg:type/namespace/name@version?qualifiers#subpath
172+
173+
**Examples:**
174+
175+
.. code-block:: text
176+
177+
pkg:npm/express@4.18.2
178+
pkg:pypi/django@4.2.0
179+
pkg:maven/org.apache.commons/commons-lang3@3.12.0
180+
pkg:docker/library/nginx@1.25.0
181+
182+
**Python usage:**
183+
184+
.. code-block:: python
185+
186+
from packageurl import PackageURL
187+
188+
purl = PackageURL.from_string('pkg:npm/express@4.18.2')
189+
print(purl.type) # 'npm'
190+
print(purl.name) # 'express'
191+
print(purl.version) # '4.18.2'
192+
193+
Output Formats
194+
==============
195+
196+
AboutCode tools support multiple output formats:
197+
198+
- **JSON**: Structured data for programmatic processing
199+
- **YAML**: Human-readable structured data
200+
- **SPDX**: Industry-standard SBOM format (JSON, YAML, RDF, tag-value)
201+
- **CycloneDX**: OWASP SBOM standard (JSON, XML)
202+
- **CSV**: Tabular data for spreadsheet analysis
203+
- **HTML**: Human-readable reports
204+
205+
Next Steps
206+
==========
207+
208+
**New to AboutCode?**
209+
Start with :ref:`start-scanning-code` to understand the basics.
210+
211+
**Ready to automate?**
212+
Check out the ScanCode Toolkit CLI documentation for command-line options.
213+
214+
**Building an integration?**
215+
Review the ScanCode.io API documentation for REST endpoints.
216+
217+
**Need to understand the data model?**
218+
See :ref:`aboutcode_data` for AboutCode data structures.
219+
220+
**Also need compliance workflows?**
221+
Visit :ref:`persona-legal-compliance` for policy management and reporting.
222+
223+
**Interested in security analysis?**
224+
Check out :ref:`persona-security-researcher` for vulnerability scanning.

0 commit comments

Comments
 (0)