Skip to content

Commit

Permalink
Resolved Library Vulnerabilities (#301)
Browse files Browse the repository at this point in the history
* Resolved Library Vulnerabilities

- updated cookiejar to 2.1.4
- updated json5 to 2.2.3
- updated ua-parser-js to 1.0.33

Signed-off-by: David Deal <[email protected]>

* CI/CD - Added GitHub Action Workflows

- added Snyk dependency scanning
- added Yarn dependency audit
- added license header check

Signed-off-by: David Deal <[email protected]>

* CI/CD - Updated Snyk Auth

Signed-off-by: David Deal <[email protected]>

* CI/CD Updates - Fixed Codeql

Signed-off-by: David Deal <[email protected]>

Signed-off-by: David Deal <[email protected]>
  • Loading branch information
dealako authored Jan 26, 2023
1 parent faf7fd3 commit 3f06127
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 21 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MI

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ name: "CodeQL"

on:
push:
branches: [master, ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
branches: [main]
schedule:
- cron: '0 12 * * 2'

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/license-header-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MI

name: License Header Check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
license-header-check:
name: License Header Check
runs-on: ubuntu-latest
environment: dev

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check License Headers
run: |
./check-headers.sh
41 changes: 41 additions & 0 deletions .github/workflows/snyk-scan-npm-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MI

name: Snyk Scan NPM Dependencies

on:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
pull_request:
branches:
- main

jobs:
snyk-scan-npm-pr:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
id: snyk
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Yarn Version
run: yarn --version
- name: Yarn Install
run: yarn install
- name: Snyk version
run: echo "${{ steps.snyk.outputs.version }}"
- name: Scan for NPM Vulnerabilities
run: |
snyk test --org=${{ secrets.SNYK_ORG }} --file=package.json
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
- name: Monitor for NPM Vulnerabilities
run: snyk monitor --org=${{ secrets.SNYK_ORG }} --file=package.json
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
27 changes: 27 additions & 0 deletions .github/workflows/yarn-scan-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MI

name: Yarn Dependency Audit

on:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
pull_request:
branches:
- main

jobs:
yarn-scan-pr:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Setup
run: yarn install
- name: Yarn Audit
run: |
yarn audit
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@
"resolutions": {
"@angular/core": "^11.0.5",
"axios": "^0.21.2",
"cookiejar": "^2.1.4",
"degenerator": "^3.0.1",
"follow-redirects": "^1.14.8",
"glob-parent": "^5.1.2",
"got": "^11.8.5",
"json5": "^2.2.3",
"json-schema": "^0.4.0",
"loader-utils": "^2.0.4",
"minimatch": "^3.0.5",
Expand All @@ -121,6 +123,7 @@
"set-value": "^4.0.2",
"simple-git": "^3.15.0",
"terser": "^5.14.2",
"ua-parser-js": "^1.0.33",
"underscore": "^1.13.1",
"ws": "^7.5.5",
"xmlhttprequest-ssl": "^1.6.3"
Expand Down
31 changes: 12 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3718,10 +3718,10 @@ cookie@~0.4.1:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==

cookiejar@^2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c"
integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==
cookiejar@^2.1.0, cookiejar@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b"
integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==

copy-anything@^2.0.1:
version "2.0.6"
Expand Down Expand Up @@ -6933,17 +6933,10 @@ json-stringify-safe@~5.0.1:
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=

json5@^2.1.0, json5@^2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==
dependencies:
minimist "^1.2.5"

json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
json5@^2.1.0, json5@^2.1.2, json5@^2.2.1, json5@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

[email protected]:
version "3.0.0"
Expand Down Expand Up @@ -11245,10 +11238,10 @@ typescript@~4.1.6:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138"
integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow==

ua-parser-js@^0.7.30:
version "0.7.32"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.32.tgz#cd8c639cdca949e30fa68c44b7813ef13e36d211"
integrity sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw==
ua-parser-js@^0.7.30, ua-parser-js@^1.0.33:
version "1.0.33"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.33.tgz#f21f01233e90e7ed0f059ceab46eb190ff17f8f4"
integrity sha512-RqshF7TPTE0XLYAqmjlu5cLLuGdKrNu9O1KLA/qp39QtbZwuzwv1dT46DZSopoUMsYgXpB3Cv8a03FI8b74oFQ==

unbzip2-stream@^1.0.9:
version "1.4.3"
Expand Down

0 comments on commit 3f06127

Please sign in to comment.