Skip to content
This repository was archived by the owner on Sep 21, 2025. It is now read-only.

Commit 3a0f7a7

Browse files
committed
Apply a bunch of updates
1 parent ee99183 commit 3a0f7a7

7 files changed

Lines changed: 2012 additions & 4800 deletions

File tree

.github/workflows/auto-updates.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
run-updates:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
ref: master
1919
fetch-depth: 10
2020
token: ${{ secrets.GH_PAT }}
2121

22-
- name: Use Node.js 18.x
23-
uses: actions/setup-node@v3
22+
- name: Use Node.js 22.x
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: 18.x
25+
node-version: 22.x
2626
registry-url: 'https://registry.npmjs.org'
2727

2828
- name: Change origin to bypass gh-pages issues with actions
@@ -34,7 +34,7 @@ jobs:
3434
run: npm ci
3535

3636
- name: Cache downloaded files
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: ${{ github.workspace }}/tmp
4040
key: ${{ runner.os }}-node-version-audit-${{ hashFiles('**/docs/rules-v1.json') }}
@@ -53,25 +53,28 @@ jobs:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5454
- run: ./scripts/github-commit-auto-updates.sh
5555

56-
- uses: docker/setup-qemu-action@v1
57-
- uses: docker/setup-buildx-action@v1
58-
- uses: docker/login-action@v1
56+
- uses: docker/setup-qemu-action@v3
57+
- uses: docker/setup-buildx-action@v3
58+
- uses: docker/login-action@v3
5959
with:
6060
username: lightswitch05
6161
password: ${{ secrets.DOCKERHUB_TOKEN }}
62-
- uses: docker/login-action@v1
62+
- uses: docker/login-action@v3
6363
with:
6464
registry: ghcr.io
6565
username: lightswitch05
6666
password: ${{ secrets.GITHUB_TOKEN }}
6767
- name: Build and push
68-
uses: docker/build-push-action@v2
68+
uses: docker/build-push-action@v6
6969
with:
7070
push: true
71+
pull: true
72+
cache-from: type=registry,ref=lightswitch05/node-version-audit:latest-cache
73+
cache-to: type=registry,ref=lightswitch05/node-version-audit:latest-cache,mode=max
7174
context: ./
7275
platforms: linux/amd64, linux/arm64
7376
build-args: |
74-
NODE_IMAGE_TAG=18
77+
NODE_IMAGE_TAG=22
7578
file: ./docker/Dockerfile
7679
tags: |
7780
lightswitch05/node-version-audit:latest

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
5353
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454
# If this step fails, then you should remove it and run the build manually (see below)
5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v2
56+
uses: github/codeql-action/autobuild@v3
5757

5858
# ℹ️ Command-line programs to run using the OS shell.
5959
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# make release
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v2
70+
uses: github/codeql-action/analyze@v3

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
node-version: [18.x, 20.x, 22.x]
1616

1717
env:
18-
IS_PRIMARY_VERSION: ${{ matrix.node-version == '18.x' }}
18+
IS_PRIMARY_VERSION: ${{ matrix.node-version == '22.x' }}
1919
PUBLISH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525

2626
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
registry-url: 'https://registry.npmjs.org'

README.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ list of CVE exploits, new releases, and end of life dates.
1616
**Node Version Audit is not:** exploit detection/mitigation, vendor-specific version tracking, a replacement for
1717
staying informed on Node.js releases and security exploits.
1818

19-
> - [Features](#features)
20-
> - [Example](#example)
21-
> - [Usage](#usage)
22-
> - [CLI](#cli)
23-
> - [Docker](#docker)
24-
> - [Direct Invocation](#direct-invocation)
25-
> - [JSON Rules](#json-rules)
26-
> - [Options](#options)
27-
> - [Output](#output)
28-
> - [Project Goals](#project-goals)
29-
> - [Acknowledgments & License](#acknowledgments--license)
19+
> - [Features](#features)
20+
> - [Example](#example)
21+
> - [Usage](#usage)
22+
> - [CLI](#cli)
23+
> - [Docker](#docker)
24+
> - [Direct Invocation](#direct-invocation)
25+
> - [JSON Rules](#json-rules)
26+
> - [Options](#options)
27+
> - [Output](#output)
28+
> - [Project Goals](#project-goals)
29+
> - [Acknowledgments & License](#acknowledgments--license)
3030
3131
## Features:
3232

33-
- List known CVEs for a given version of Node.js
34-
- Check either the runtime version of Node.js, or a supplied version
35-
- Display end-of-life dates for a given version of Node.js
36-
- Display new releases for a given version of Node.js with configurable specificity (latest/minor/patch)
37-
- Patch: 16.13.0 -> 16.13.2
38-
- Minor: 16.13.0 -> 16.14.2
39-
- Latest: 16.13.0 -> 17.9.0
40-
- Rules automatically updated daily. Information is sourced directly from nodejs.org - you'll never be waiting on someone like me to merge a pull request before getting the latest patch information.
41-
- Multiple interfaces: CLI (via NPM), Docker, direct code import
42-
- Easily scriptable for use with CI/CD workflows. All Docker/CLI outputs are in JSON format to be consumed with your favorite tools - such as [jq](https://stedolan.github.io/jq/)
43-
- Configurable exit conditions. Use CLI flags like `--fail-security` to set a failure exit code if the given version of Node.js has a known CVE or is no longer supported.
44-
- Zero dependencies
33+
- List known CVEs for a given version of Node.js
34+
- Check either the runtime version of Node.js, or a supplied version
35+
- Display end-of-life dates for a given version of Node.js
36+
- Display new releases for a given version of Node.js with configurable specificity (latest/minor/patch)
37+
- Patch: 16.13.0 -> 16.13.2
38+
- Minor: 16.13.0 -> 16.14.2
39+
- Latest: 16.13.0 -> 17.9.0
40+
- Rules automatically updated daily. Information is sourced directly from nodejs.org - you'll never be waiting on someone like me to merge a pull request before getting the latest patch information.
41+
- Multiple interfaces: CLI (via NPM), Docker, direct code import
42+
- Easily scriptable for use with CI/CD workflows. All Docker/CLI outputs are in JSON format to be consumed with your favorite tools - such as [jq](https://stedolan.github.io/jq/)
43+
- Configurable exit conditions. Use CLI flags like `--fail-security` to set a failure exit code if the given version of Node.js has a known CVE or is no longer supported.
44+
- Zero dependencies
4545

4646
## Example:
4747

@@ -141,37 +141,37 @@ Get the latest Node.js 17 release version directly from the rules using [curl](h
141141

142142
### Output
143143

144-
- auditVersion: string - The version of Node.js that is being audited.
145-
- hasVulnerabilities: bool - If the auditVersion has any known CVEs or not.
146-
- hasSupport: bool - If the auditVersion is still receiving support.
147-
- supportType: string - The current support status of auditVersion: 'current'|'active'|'maintenance'|'none'.
148-
- isLatestPatchVersion: bool - If auditVersion is the latest patch-level release (17.9.x).
149-
- isLatestMinorVersion: bool - If auditVersion is the latest minor-level release (17.x.x).
150-
- isLatestVersion: bool - If auditVersion is the latest release (x.x.x).
151-
- latestPatchVersion: string - The latest patch-level version for auditVersion.
152-
- latestMinorVersion: string - The latest minor-level version for auditVersion.
153-
- latestVersion: string - The latest Node.js version.
154-
- activeSupportEndDate: string|null - ISO8601 formatted date for the end of active support for auditVersion.
155-
- supportEndDate: string|null - ISO8601 formatted date for the end of maintenance support for auditVersion.
156-
- rulesLastUpdatedDate: string - ISO8601 formatted date for the last time the rules were auto-updated.
157-
- vulnerabilities: object - CVEs known to affect auditVersion with details about the CVE. CVE Details might be null for recently discovered CVEs.
144+
- auditVersion: string - The version of Node.js that is being audited.
145+
- hasVulnerabilities: bool - If the auditVersion has any known CVEs or not.
146+
- hasSupport: bool - If the auditVersion is still receiving support.
147+
- supportType: string - The current support status of auditVersion: 'current'|'active'|'maintenance'|'none'.
148+
- isLatestPatchVersion: bool - If auditVersion is the latest patch-level release (17.9.x).
149+
- isLatestMinorVersion: bool - If auditVersion is the latest minor-level release (17.x.x).
150+
- isLatestVersion: bool - If auditVersion is the latest release (x.x.x).
151+
- latestPatchVersion: string - The latest patch-level version for auditVersion.
152+
- latestMinorVersion: string - The latest minor-level version for auditVersion.
153+
- latestVersion: string - The latest Node.js version.
154+
- activeSupportEndDate: string|null - ISO8601 formatted date for the end of active support for auditVersion.
155+
- supportEndDate: string|null - ISO8601 formatted date for the end of maintenance support for auditVersion.
156+
- rulesLastUpdatedDate: string - ISO8601 formatted date for the last time the rules were auto-updated.
157+
- vulnerabilities: object - CVEs known to affect auditVersion with details about the CVE. CVE Details might be null for recently discovered CVEs.
158158

159159
## Project Goals:
160160

161-
- Always use update-to-date information and fail if it becomes too stale. Since this tool is designed to help its users stay informed, it must in turn fail if it becomes outdated.
162-
- Fail if the requested information is unavailable. ex. auditing an unknown version of Node.js like 12.50.0, or 0.9.0. Again, since this tool is designed to help its users stay informed, it must in turn fail if the requested information is unavailable.
163-
- Work in both open and closed networks (as long as the tool is up-to-date).
164-
- Minimal footprint and dependencies (no runtime dependencies).
165-
- Runtime support for the oldest supported version of Node.js. If you are using this tool with an unsupported version of Node.js, then you already have all the answers that this tool can give you: Yes, you have vulnerabilities and are out of date. Of course that is just for the run-time, it is still the goal of this project to supply information about any reasonable version of Node.js.
161+
- Always use update-to-date information and fail if it becomes too stale. Since this tool is designed to help its users stay informed, it must in turn fail if it becomes outdated.
162+
- Fail if the requested information is unavailable. ex. auditing an unknown version of Node.js like 12.50.0, or 0.9.0. Again, since this tool is designed to help its users stay informed, it must in turn fail if the requested information is unavailable.
163+
- Work in both open and closed networks (as long as the tool is up-to-date).
164+
- Minimal footprint and dependencies (no runtime dependencies).
165+
- Runtime support for the oldest supported version of Node.js. If you are using this tool with an unsupported version of Node.js, then you already have all the answers that this tool can give you: Yes, you have vulnerabilities and are out of date. Of course that is just for the run-time, it is still the goal of this project to supply information about any reasonable version of Node.js.
166166

167167
## Acknowledgments & License
168168

169-
- This project is released under the [Apache License 2.0](https://raw.githubusercontent.com/lightswitch05/node-version-audit/master/LICENSE).
170-
- The accuracy of the information provided by this project cannot be verified or guaranteed. All functions are provided as convenience only and should not be relied on for accuracy or punctuality.
171-
- The logo was created using Mathias Pettersson and Brian Hammond's [Node.js Logo](https://nodejs.org/en/about/resources/#logo-downloads) as the base image. The logo has been modified from its original form to include overlay graphics.
172-
- This project and the use of the modified Node.js logo is not endorsed by Mathias Pettersson or Brian Hammond.
173-
- This project and the use of the Node.js name is not endorsed by OpenJS Foundation.
174-
- CVE details and descriptions are downloaded from National Institute of Standard and Technology's [National Vulnerability Database](https://nvd.nist.gov/). This project and the use of CVE information is not endorsed by NIST or the NVD. CVE details are provided as convenience only. The accuracy of the information cannot be verified.
175-
- Node.js release details and support dates are generated from [Changelogs](https://github.com/nodejs/node/tree/master/doc/changelogs) and the [Release Schedule](https://github.com/nodejs/Release/blob/main/schedule.json). The accuracy of the information cannot be verified.
169+
- This project is released under the [Apache License 2.0](https://raw.githubusercontent.com/lightswitch05/node-version-audit/master/LICENSE).
170+
- The accuracy of the information provided by this project cannot be verified or guaranteed. All functions are provided as convenience only and should not be relied on for accuracy or punctuality.
171+
- The logo was created using Mathias Pettersson and Brian Hammond's [Node.js Logo](https://nodejs.org/en/about/resources/#logo-downloads) as the base image. The logo has been modified from its original form to include overlay graphics.
172+
- This project and the use of the modified Node.js logo is not endorsed by Mathias Pettersson or Brian Hammond.
173+
- This project and the use of the Node.js name is not endorsed by OpenJS Foundation.
174+
- CVE details and descriptions are downloaded from National Institute of Standard and Technology's [National Vulnerability Database](https://nvd.nist.gov/). This project and the use of CVE information is not endorsed by NIST or the NVD. CVE details are provided as convenience only. The accuracy of the information cannot be verified.
175+
- Node.js release details and support dates are generated from [Changelogs](https://github.com/nodejs/node/tree/master/doc/changelogs) and the [Release Schedule](https://github.com/nodejs/Release/blob/main/schedule.json). The accuracy of the information cannot be verified.
176176

177177
Copyright © 2022 Daniel White

docker/Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
ARG NODE_IMAGE_TAG
2-
FROM node:${NODE_IMAGE_TAG} as builder
2+
FROM scratch AS files
33
WORKDIR /opt/node-version-audit
4-
COPY ./docker/docker-entrypoint.sh ./docker/docker-entrypoint.sh
5-
ADD ./package-lock.json .
6-
ADD ./package.json .
4+
# none of these files change often
75
ADD ./lib ./lib/
86
ADD ./bin ./bin/
9-
ADD ./docs/rules-v1.json ./docs/
7+
8+
FROM node:${NODE_IMAGE_TAG} AS builder
109
ENV NODE_ENV=production
11-
RUN npm install --production
10+
WORKDIR /opt/node-version-audit
11+
ADD ./package-lock.json .
12+
ADD ./package.json .
13+
RUN npm ci --omit=dev
1214

1315
FROM node:${NODE_IMAGE_TAG}
1416
WORKDIR /opt/node-version-audit
1517
ENV NVA_REQUIRE_VERSION_ARG=true
1618
ENV NODE_ENV=production
17-
COPY --from=builder /opt/node-version-audit /opt/node-version-audit
19+
COPY ./docker/docker-entrypoint.sh ./docker/docker-entrypoint.sh
1820
ENTRYPOINT ["/opt/node-version-audit/docker/docker-entrypoint.sh"]
21+
COPY --link --from=builder /opt/node-version-audit /opt/node-version-audit
22+
COPY --link --from=files /opt/node-version-audit /opt/node-version-audit
23+
# this is the only file that changes regularly
24+
COPY ./docs/rules-v1.json ./docs/

0 commit comments

Comments
 (0)