Skip to content

Commit

Permalink
Merge pull request #106 from timoa/develop
Browse files Browse the repository at this point in the history
Fix Docker health check + improve security + update deps
  • Loading branch information
timoa authored Jun 10, 2022
2 parents 9f49940 + 56fdd20 commit 8ddb705
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Harden the GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
Expand All @@ -37,7 +37,7 @@ jobs:

steps:
- name: Harden the GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Harden the GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
Expand All @@ -44,15 +44,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # tag=v2.1.11
uses: github/codeql-action/init@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2.1.12
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # tag=v2.1.11
uses: github/codeql-action/autobuild@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2.1.12

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -66,4 +66,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # tag=v2.1.11
uses: github/codeql-action/analyze@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2.1.12
18 changes: 10 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ jobs:

steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
itunes.apple.com:443
pipelines.actions.githubusercontent.com:443
objects.githubusercontent.com:443
play.google.com:443
registry.npmjs.org:443
nodejs.org:443
snyk.io:443
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # tag=v3.1.1
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # tag=v3.2.0
with:
node-version: ${{ matrix.node }}
check-latest: true
Expand All @@ -48,7 +50,7 @@ jobs:
run: npm run test:coverage

- name: Save Code Coverage
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: code-coverage
path: coverage
Expand All @@ -61,7 +63,7 @@ jobs:

steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
Expand Down Expand Up @@ -98,7 +100,7 @@ jobs:

steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: block
allowed-endpoints: >
Expand All @@ -121,7 +123,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCAN_ANNOTATE_PR: true

- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0
with:
name: reports
path: reports
Expand All @@ -137,7 +139,7 @@ jobs:

steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: audit

Expand All @@ -158,7 +160,7 @@ jobs:

steps:
- name: Harden GitHub Actions Runner
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813
uses: step-security/harden-runner@dd5681a7d0c66fb362664d618ef4a90d656f6516
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.0-alpine3.15@sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10
FROM node:16.15.1-alpine3.15@sha256:1fafca8cf41faf035192f5df1a5387656898bec6ac2f92f011d051ac2344f5c9
ARG appPort=9514

LABEL maintainer="Damien Laureaux <[email protected]>" \
Expand Down
66 changes: 33 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"homepage": "https://github.com/timoa/app-stores-prometheus-exporter#readme",
"dependencies": {
"@snyk/protect": "1.924.0",
"@snyk/protect": "1.939.0",
"app-store-scraper": "0.17.0",
"google-play-scraper": "8.1.0",
"prom-client": "14.0.1",
Expand All @@ -60,11 +60,11 @@
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-http": "4.3.0",
"eslint": "8.15.0",
"eslint": "8.16.0",
"eslint-config-airbnb": "19.0.4",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react": "7.30.0",
"espree": "9.3.2",
"mocha": "10.0.0",
"npm-run-all": "4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion src/healthcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const http = require('http');
const options = {
host: '0.0.0.0',
port: '9514',
path: '/_health',
path: '/health',
method: 'HEAD',
timeout: 2000,
};
Expand Down

0 comments on commit 8ddb705

Please sign in to comment.