Skip to content

Commit becab5b

Browse files
committed
feat: initial version
Signed-off-by: Michael Dawson <[email protected]>
1 parent 8cb306a commit becab5b

File tree

4 files changed

+113
-1
lines changed

4 files changed

+113
-1
lines changed

.github/workflows/daily-main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Check main for vulns daily
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
nodejsStream:
7+
default: 'main'
8+
schedule:
9+
- cron: 0 0 * * *
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
check-vulns:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Setup Python 3.9
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: '3.9'
22+
- name: Checkout node.js repo
23+
uses: actions/checkout@v3
24+
with:
25+
repository: nodejs/node
26+
path: node
27+
ref: ${{ github.event.inputs.nodejsStream || 'main' }}
28+
- name: Installing pre-reqs
29+
run: |
30+
cd ${{ github.workspace }}/node/tools/dep_checker
31+
pip install -r requirements.txt
32+
- name: Run the check
33+
run: |
34+
cd ${{ github.workspace }}/node/tools/dep_checker
35+
(
36+
set -o pipefail
37+
python main.py --gh-token ${{ secrets.VULN_CHECK_TOKEN }} 2>&1 | tee result.log
38+
)
39+
- name: collect error
40+
id: collect_error
41+
if: ${{ failure() }}
42+
run: |
43+
cd ${{ github.workspace }}/node/tools/dep_checker
44+
result=`cat result.log`
45+
curdate=`date`
46+
echo "::set-output name=date::$curdate"
47+
echo "::set-output name=result::$result"
48+
- name: check for failure
49+
if: ${{ failure() }}
50+
run: |
51+
curl --request POST \
52+
--url https://api.github.com/repos/${{ github.repository }}/issues \
53+
--header 'Authorization: token ${{ secrets.VULN_CHECK_TOKEN }}' \
54+
--header 'Accept: application/vnd.github+json' \
55+
--data '{
56+
"title": "Vulnerability check reported failure - ${{ steps.collect_error.outputs.date }}",
57+
"body": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \\\n${{ steps.collect_error.outputs.result }}"}'

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Code of Conduct
2+
3+
The Node.js Code of Conduct, which applies to this project, can be found at
4+
https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md.

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
We welcome participation in this effort. Please feel free to
4+
raise or comment on issues and join any of the scheduled meetings.
5+
6+
## Developer's Certificate of Origin 1.1
7+
8+
By making a contribution to this project, I certify that:
9+
10+
* (a) The contribution was created in whole or in part by me and I
11+
have the right to submit it under the open source license
12+
indicated in the file; or
13+
14+
* (b) The contribution is based upon previous work that, to the best
15+
of my knowledge, is covered under an appropriate open source
16+
license and I have the right under that license to submit that
17+
work with modifications, whether created in whole or in part
18+
by me, under the same open source license (unless I am
19+
permitted to submit under a different license), as indicated
20+
in the file; or
21+
22+
* (c) The contribution was provided directly to me by some other
23+
person who certified (a), (b) or (c) and I have not modified
24+
it.
25+
26+
* (d) I understand and agree that this project and the contribution
27+
are public and that a record of the contribution (including all
28+
personal information I submit with it, including my sign-off) is
29+
maintained indefinitely and may be redistributed consistent with
30+
this project or the open source license(s) involved.

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# node-js-dependency-vuln-assessments
1+
# node-js-dependency-vuln-assessments
2+
3+
This repo is used to
4+
5+
1. Run automated checks for vulnerabilities in Node.js dependencies that have
6+
already been made public
7+
1. Track and communicate information about vulnerabilities in depdencies that
8+
are public and have not yet been addressed. This maybe be to documented
9+
that they don't affect Node.js or what action is being taken to address
10+
then.
11+
12+
13+
Automated checks are currently run through a GitHub action using
14+
[dep_checker](https://github.com/nodejs/node/tree/main/tools/dep_checker).
15+
16+
**DO NOT REPORT OR DISCUSS VULNERABLITIES THAT ARE NOT ALREADY
17+
PUBLIC IN THIS REPO**. Please report new vulnerabilities either to
18+
the projects for a specific dependency or report to the Node.js project
19+
as outlined in the Node.js project's
20+
[SECURITY.md](https://github.com/nodejs/node/blob/main/SECURITY.md) file.
21+
22+

0 commit comments

Comments
 (0)