Skip to content

Commit ccd5885

Browse files
committed
fix(security): unpinned cdn dependency versions allow supply chai
The `marked` and `marked-gfm-heading-id` libraries are loaded from jsdelivr without pinned versions (`/npm/marked/marked.min.js` and `/npm/marked-gfm-heading-id/lib/index.umd.js`). This means the CDN serves whatever the latest version is, which could change at any time. A malicious version published to npm would be automatically served to all visitors. Affected files: index.html Signed-off-by: Trần Bách <45133811+barttran2k@users.noreply.github.com>
1 parent 56e5f58 commit ccd5885

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
<main></main>
3636

3737
<!-- JavaScript Library to Convert Markdown into HTML -->
38-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
38+
<script src="https://cdn.jsdelivr.net/npm/marked@12.0.2/marked.min.js"></script>
3939

4040
<!-- Marked plugin to add heading ID's -->
41-
<script src="https://cdn.jsdelivr.net/npm/marked-gfm-heading-id/lib/index.umd.js"></script>
41+
<script src="https://cdn.jsdelivr.net/npm/marked-gfm-heading-id@3.2.0/lib/index.umd.js"></script>
4242

4343
<script>
4444
// Basic Settings

0 commit comments

Comments
 (0)