Skip to content

Commit e6e8438

Browse files
authored
Migrate markdown link checks to local npm script (#970)
1 parent 24f8d46 commit e6e8438

4 files changed

Lines changed: 43 additions & 45 deletions

File tree

.github/markdown-link-check.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
],
1212
"ignorePatterns": [
1313
{ "pattern": "^#" },
14-
{ "pattern": "https://www\\.st\\.com/en/development-tools/hardware-debugger-and-programmer-tools-for-stm32/products\\.html" }
14+
{ "pattern": "^https://developer\\.arm\\.com/" }
1515
]
1616
}

.github/workflows/markdown.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
check-links:
4646
name: Check Markdown Links
4747
runs-on: ubuntu-latest
48+
permissions:
49+
packages: read
4850
steps:
4951
- name: Harden the runner (Audit all outbound calls)
5052
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
@@ -53,9 +55,18 @@ jobs:
5355

5456
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5557

56-
- name: Check Links
57-
uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1.1.2
58+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
59+
env:
60+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5861
with:
59-
use-quiet-mode: 'no'
60-
use-verbose-mode: 'yes'
61-
config-file: '.github/markdown-link-check.jsonc'
62+
node-version-file: package.json
63+
registry-url: https://npm.pkg.github.com
64+
package-manager-cache: false
65+
66+
- name: Install dependencies
67+
env:
68+
GITHUB_TOKEN: ${{ github.token }}
69+
run: npm ci
70+
71+
- name: Check Links
72+
run: npm run check:links

.github/workflows/nightly.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,6 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
check-links:
17-
name: Check Markdown Links
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Harden the runner (Audit all outbound calls)
21-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
22-
with:
23-
egress-policy: audit
24-
25-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26-
27-
- name: Check Links
28-
uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1.1.2
29-
with:
30-
use-quiet-mode: 'no'
31-
use-verbose-mode: 'yes'
32-
config-file: '.github/markdown-link-check.jsonc'
33-
3416
build:
3517
if: github.repository == 'Open-CMSIS-Pack/vscode-cmsis-debugger'
3618
strategy:
@@ -102,7 +84,12 @@ jobs:
10284
if: runner.os == 'Linux'
10385
run: npm run build
10486

87+
- name: Check Links
88+
if: runner.os == 'Linux'
89+
run: npm run check:links
90+
10591
- name: Check copyright
92+
if: runner.os == 'Linux'
10693
run: npm run copyright:check
10794

10895
- name: Test

SECURITY.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
# Open-CMSIS-Pack Security Policy
1+
# Open-CMSIS-Pack Security Policy
22

3-
This document outlines the security procedures and policies for the Open-CMSIS-Pack vscode-cmsis-debugger project.
3+
This document outlines the security procedures and policies for the Open-CMSIS-Pack vscode-cmsis-debugger project.
44

5-
## Table of Contents
5+
## Table of Contents
66

7-
- [Reporting a Security Issue](#reporting-a-security-issue)
8-
- [Vulnerability Management](#vulnerability-management)
9-
- [Improving This Policy](#improving-this-policy)
7+
- [Reporting a Security Issue](#reporting-a-security-issue)
8+
- [Vulnerability Management](#vulnerability-management)
9+
- [Improving This Policy](#improving-this-policy)
1010

11-
## Reporting a Security Issue
11+
## Reporting a Security Issue
1212

1313
The Open-CMSIS-Pack vscode-cmsis-debugger maintainers take security issues seriously and appreciate responsible
14-
disclosure. Your efforts to improve project security are highly valued.
14+
disclosure. Your efforts to improve project security are highly valued.
1515

1616
We use GitHub's [private vulnerability reporting](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability)
1717
guidelines.
1818
To report a security issue, please click on
1919
[Report a vulnerability](https://github.com/Open-CMSIS-Pack/vscode-cmsis-debugger/security/advisories/new) and
20-
include:
20+
include:
2121

22-
- A detailed description of the issue
23-
- Steps to reproduce the vulnerability
24-
- Affected project versions
25-
- Any known mitigations
22+
- A detailed description of the issue
23+
- Steps to reproduce the vulnerability
24+
- Affected project versions
25+
- Any known mitigations
2626

2727
A maintainer will acknowledge your report as soon as possible and guide the next steps. We will keep you informed of
28-
progress toward a fix and may request additional details if needed.
28+
progress toward a fix and may request additional details if needed.
2929

30-
## Vulnerability Management
30+
## Vulnerability Management
3131

32-
Once a security issue is reported, the maintainers will:
32+
Once a security issue is reported, the maintainers will:
3333

34-
1. Confirm the issue
35-
2. Identify/Confirm affected versions
36-
3. Audit related code for similar vulnerabilities
37-
4. Develop and release patches for maintained versions
34+
1. Confirm the issue
35+
2. Identify/Confirm affected versions
36+
3. Audit related code for similar vulnerabilities
37+
4. Develop and release patches for maintained versions
3838

39-
## Improving This Policy
39+
## Improving This Policy
4040

4141
If you have suggestions for improving this process, please open an issue or submit a pull request.

0 commit comments

Comments
 (0)