-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathchecklinks.sh
More file actions
executable file
·21 lines (16 loc) · 1014 Bytes
/
checklinks.sh
File metadata and controls
executable file
·21 lines (16 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# recursive -r option blows up so recurse in bash instead
# example non-CI usage
# ./checklinks.sh > ./checklinks_report.txt
# grep '[✖]' checklinks_report.txt
# Change directory to the docs directory
cd docs
# Find all Markdown files recursively and loop through them
find . -type f -name '*.md' -print0 | while IFS= read -r -d '' file; do
# Run mkdocs-linkcheck on the file
mkdocs-linkcheck "$file" --exclude "../assets/images" --exclude "https://www.gartner.com/smarterwithgartner/focus-on-the-biggest-security-threats-not-the-most-publicized" --exclude "https://help.kennasecurity.com/hc/en-us/articles/360026160592-Vulnerability-Scoring-in-Kenna"
done
# False Positives:
# https://help.kennasecurity.com/hc/en-us/articles/360026160592-Vulnerability-Scoring-in-Cisco-Vulnerability-Management
# https://www.gartner.com/smarterwithgartner/focus-on-the-biggest-security-threats-not-the-most-publicized
# https://docs-prv.pcisecuritystandards.org/PCI%20DSS/Standard/PCI-DSS-v4_0.pdf