Skip to content

Commit 5d5fa3e

Browse files
MaffoochpaulOsinskiclaude
authored
Fix URLs and expand Lychee coverage (#14855)
* fix: correct URL for 'Model Your Assets' in menu configuration * ci(docs): expand lychee to catch absURL nav links and in-app help links Add `--remap` so absolute `docs.defectdojo.com` URLs resolve against the freshly built site. Previously these were skipped as remote URLs in offline mode, which masked the broken Model Your Assets menu link fixed in #14855 — Hugo renders menu items with `absURL`, so a broken nav URL hides in `https://docs.defectdojo.com/...` form and lychee excludes it. Add a second lychee invocation that scans every file under `dojo/` that hardcodes a `docs.defectdojo.com` URL (Django templates, settings) and checks those against the same built site, so an in-app help link to a moved or renamed doc page fails CI instead of silently 404ing in the UI. Update the contributing docs with the local-reproduction commands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: fix five 404 links surfaced by expanded lychee check The new --remap flag added in the previous commit causes lychee to resolve absolute docs.defectdojo.com URLs against the built site. Five in-content links to moved/renamed pages, previously masked because they were skipped as remote URLs in --offline mode, now fail. Repoint each to its current canonical path. - get_started/about/about_defectdojo.md: architecture and running-in- production now live under /get_started/open_source/, not /open_source/installation/. - metrics_reports/reports/using_the_report_builder.md: working_with_ generated_reports uses underscores, not hyphens, and is under /metrics_reports/reports/ canonically. - supported_tools/parsers/file/aws_prowler_v3plus.md and burp_suite_dast.md: parser pages live under /supported_tools/parsers/file/, not /supported_tools/file/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Paul Osinski <posinski34@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5919caa commit 5d5fa3e

7 files changed

Lines changed: 52 additions & 9 deletions

File tree

.github/workflows/validate_docs_build.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,36 @@ jobs:
4444
- name: Check internal links
4545
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
4646
with:
47-
args: --offline --no-progress --root-dir docs/public './docs/public/**/*.html'
47+
# --remap makes lychee resolve absolute docs.defectdojo.com URLs against
48+
# the freshly built site, so absURL-rendered links (e.g. nav menu items)
49+
# are verified as 404s instead of being skipped as remote URLs.
50+
args: >-
51+
--offline --no-progress
52+
--root-dir ${{ github.workspace }}/docs/public
53+
--remap "https://docs.defectdojo.com file://${{ github.workspace }}/docs/public"
54+
'./docs/public/**/*.html'
4855
fail: true
4956

57+
- name: Check in-app docs help links
58+
# Find every file under dojo/ that hardcodes a docs.defectdojo.com URL
59+
# (templates, settings, etc.) and check those links against the freshly
60+
# built site. --remap turns the absolute docs URLs into local file lookups;
61+
# --exclude '%7[BD]' drops URL-encoded Django template tags ({% ... %})
62+
# so only real external docs URLs are checked. lychee is on $PATH from
63+
# the previous lychee-action step.
64+
run: |
65+
set -euo pipefail
66+
mapfile -t files < <(grep -rl 'docs\.defectdojo\.com' dojo/ \
67+
--include='*.html' --include='*.py' --include='*.tpl')
68+
if [ "${#files[@]}" -eq 0 ]; then
69+
echo "No files reference docs.defectdojo.com — pattern is stale." >&2
70+
exit 1
71+
fi
72+
printf 'Checking in-app docs links in:\n'
73+
printf ' %s\n' "${files[@]}"
74+
lychee --offline --no-progress \
75+
--root-dir "${GITHUB_WORKSPACE}/docs/public" \
76+
--remap "https://docs.defectdojo.com file://${GITHUB_WORKSPACE}/docs/public" \
77+
--exclude '%7[BD]' \
78+
"${files[@]}"
79+

docs/config/_default/menus/menus.en.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
[[main]]
1717
name = "Model Your Assets"
18-
url = "/asset_modelling/hierarchy/pro__assets_organizations/"
18+
url = "/asset_modelling/pro_hierarchy/assets_organizations/"
1919
weight = 13
2020

2121
[[main]]

docs/content/get_started/about/about_defectdojo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ For teams managing a smaller volume of Findings, DefectDojo Open-Source is a gre
6868
There are a few supported ways to install DefectDojo’s Open-Source edition ([available on Github](https://github.com/DefectDojo/django-DefectDojo)):
6969

7070
[Docker Compose](https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/DOCKER.md) is the easiest method to install the core program and services required to run DefectDojo.
71-
Our [Architecture](https://docs.defectdojo.com/open_source/installation/architecture/) guide gives you an overview of each service and component used by DefectDojo.
72-
[Running In Production](https://docs.defectdojo.com/open_source/installation/running-in-production/) lists system requirements, performance tweaks and maintenance processes for running DefectDojo on a production server (with Docker Compose).
71+
Our [Architecture](https://docs.defectdojo.com/get_started/open_source/architecture/) guide gives you an overview of each service and component used by DefectDojo.
72+
[Running In Production](https://docs.defectdojo.com/get_started/open_source/running-in-production/) lists system requirements, performance tweaks and maintenance processes for running DefectDojo on a production server (with Docker Compose).
7373

7474
Kubernetes is not fully supported at the Open-Source level, but this guide can be referenced and used as a starting point to integrate DefectDojo into Kubernetes architecture.
7575

docs/content/get_started/contributing/documentation.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,22 @@ audience: opensource
3737

3838
## Unit tests for docs
3939

40-
DefectDojo's docs use Lychee to check for 404s and other link errors. To run this test locally, you can run this command from the root of the repo. This will delete anything in Hugo's `/public/` folder and then rebuild.
40+
DefectDojo's docs use Lychee to check for 404s and other link errors. CI runs two checks: the rendered docs site, and any `docs.defectdojo.com` URLs hardcoded into the Django app (templates and settings). Both use a `--remap` so absolute `docs.defectdojo.com` URLs resolve against the freshly built site. To run both locally from the root of the repo:
4141

42-
`cd docs && rm -rf public/ && hugo --minify --gc --config config/production/hugo.toml && lychee --offline --no-progress --root-dir public './public/**/*.html'`
42+
```
43+
cd docs && rm -rf public/ && hugo --minify --gc --config config/production/hugo.toml && cd ..
44+
45+
lychee --offline --no-progress \
46+
--root-dir "$PWD/docs/public" \
47+
--remap "https://docs.defectdojo.com file://$PWD/docs/public" \
48+
'./docs/public/**/*.html'
49+
50+
lychee --offline --no-progress \
51+
--root-dir "$PWD/docs/public" \
52+
--remap "https://docs.defectdojo.com file://$PWD/docs/public" \
53+
--exclude '%7[BD]' \
54+
$(grep -rl 'docs\.defectdojo\.com' dojo/ --include='*.html' --include='*.py' --include='*.tpl')
55+
```
4356

4457
### Theme overrides
4558

docs/content/metrics_reports/reports/using_the_report_builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 1
55
aliases:
66
- /en/share_your_findings/pro_reports/using_the_report_builder
77
---
8-
DefectDojo allows you to create Custom Reports for external audiences, which summarize the Findings or Endpoints that you wish to report on. Custom Reports can include branding and boilerplate text, and can also be used as **[Templates](https://docs.defectdojo.com/en/pro_reports/working-with-generated-reports/)** for future reports.
8+
DefectDojo allows you to create Custom Reports for external audiences, which summarize the Findings or Endpoints that you wish to report on. Custom Reports can include branding and boilerplate text, and can also be used as **[Templates](https://docs.defectdojo.com/metrics_reports/reports/working_with_generated_reports/)** for future reports.
99

1010
## Opening the Report Builder
1111

docs/content/supported_tools/parsers/file/aws_prowler_v3plus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ toc_hide: true
55

66
### File Types
77
DefectDojo parser accepts a native `json` file produced by prowler v3 with file extension `.json` or a `ocsf-json` file produced by prowler v4 with file extension `.ocsf.json`.
8-
Please note: earlier versions of AWS Prowler create output data in a different format. See our other [prowler parser documentation](https://docs.defectdojo.com/supported_tools/file/aws_prowler/) if you are using an earlier version of AWS Prowler.
8+
Please note: earlier versions of AWS Prowler create output data in a different format. See our other [prowler parser documentation](https://docs.defectdojo.com/supported_tools/parsers/file/aws_prowler/) if you are using an earlier version of AWS Prowler.
99

1010
JSON reports can be created from the [AWS Prowler v3 CLI](https://docs.prowler.com/projects/prowler-open-source/en/v3/tutorials/reporting/#json) using the following command: `prowler <provider> -M json`
1111

docs/content/supported_tools/parsers/file/burp_suite_dast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc_hide: true
77
The Burp Suite DAST Scan parser processes HTML reports from Burp Suite DAST and imports the findings into DefectDojo. The parser extracts vulnerability details, severity ratings, descriptions, remediation steps, and other metadata from the HTML report.
88

99
## Supported File Types
10-
The parser accepts a Standard Report as an HTML file. To parse an XML file instead, use the [Burp XML parser](https://docs.defectdojo.com/supported_tools/file/burp/).
10+
The parser accepts a Standard Report as an HTML file. To parse an XML file instead, use the [Burp XML parser](https://docs.defectdojo.com/supported_tools/parsers/file/burp/).
1111

1212
See the Burp documentation for information on how to export a Standard Report: [Burp Suite DAST Downloading reports](https://portswigger.net/burp/documentation/dast/user-guide/work-with-scan-results/generate-reports)
1313

0 commit comments

Comments
 (0)