@felloh-org/lambda-wrapper 1.11.214 → 1.11.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.concourse/pipeline.yml +49 -3
- package/.concourse/private.yml +0 -0
- package/.github/workflows/release.yml +5 -8
- package/.github/workflows/sast.yml +20 -0
- package/README.md +573 -97
- package/SECURITY.md +58 -0
- package/{ormconfig.js → data-source.js} +2 -4
- package/dist/index.js +1 -1
- package/jest.config.js +8 -0
- package/package.json +36 -13
- package/webpack.config.js +1 -1
package/.concourse/pipeline.yml
CHANGED
|
@@ -7,12 +7,17 @@ resource_types:
|
|
|
7
7
|
type: docker-image
|
|
8
8
|
source:
|
|
9
9
|
repository: teliaoss/github-pr-resource
|
|
10
|
+
tag: latest
|
|
11
|
+
username: ((docker.username))
|
|
12
|
+
password: ((docker.password))
|
|
10
13
|
|
|
11
14
|
- name: slack-notification
|
|
12
|
-
type:
|
|
15
|
+
type: registry-image
|
|
13
16
|
source:
|
|
14
17
|
repository: mockersf/concourse-slack-notifier
|
|
15
18
|
tag: latest
|
|
19
|
+
username: ((docker.username))
|
|
20
|
+
password: ((docker.password))
|
|
16
21
|
|
|
17
22
|
# --------------------------------------------------------------------------------------------------
|
|
18
23
|
# Resources
|
|
@@ -24,7 +29,6 @@ resources:
|
|
|
24
29
|
source:
|
|
25
30
|
uri: git@github.com:felloh-org/concourse-scripts.git
|
|
26
31
|
branch: main
|
|
27
|
-
depth: 0
|
|
28
32
|
private_key: ((git.private_key))
|
|
29
33
|
|
|
30
34
|
- name: lambda-wrapper
|
|
@@ -32,7 +36,6 @@ resources:
|
|
|
32
36
|
source:
|
|
33
37
|
uri: git@github.com:felloh-org/lambda-wrapper.git
|
|
34
38
|
branch: main
|
|
35
|
-
depth: 0
|
|
36
39
|
private_key: ((git.private_key))
|
|
37
40
|
|
|
38
41
|
- name: slack-alert-deploy
|
|
@@ -44,11 +47,54 @@ resources:
|
|
|
44
47
|
# Jobs
|
|
45
48
|
# --------------------------------------------------------------------------------------------------
|
|
46
49
|
jobs:
|
|
50
|
+
- name: 'lint-and-test'
|
|
51
|
+
plan:
|
|
52
|
+
- in_parallel:
|
|
53
|
+
- get: lambda-wrapper
|
|
54
|
+
trigger: true
|
|
55
|
+
- get: concourse-scripts
|
|
56
|
+
- in_parallel:
|
|
57
|
+
- task: 'lint'
|
|
58
|
+
file: concourse-scripts/scripts/npm_run/npm_run.yml
|
|
59
|
+
input_mapping:
|
|
60
|
+
repository: lambda-wrapper
|
|
61
|
+
params:
|
|
62
|
+
NPM_COMMAND: 'lint'
|
|
63
|
+
- task: 'test'
|
|
64
|
+
file: concourse-scripts/scripts/npm_run/npm_run.yml
|
|
65
|
+
input_mapping:
|
|
66
|
+
repository: lambda-wrapper
|
|
67
|
+
params:
|
|
68
|
+
NPM_COMMAND: 'test'
|
|
69
|
+
- task: 'audit'
|
|
70
|
+
file: concourse-scripts/scripts/npm_run/npm_run.yml
|
|
71
|
+
input_mapping:
|
|
72
|
+
repository: lambda-wrapper
|
|
73
|
+
params:
|
|
74
|
+
NPM_COMMAND: 'audit:check'
|
|
75
|
+
- task: 'sast'
|
|
76
|
+
config:
|
|
77
|
+
platform: linux
|
|
78
|
+
image_resource:
|
|
79
|
+
type: docker-image
|
|
80
|
+
source:
|
|
81
|
+
repository: semgrep/semgrep
|
|
82
|
+
inputs:
|
|
83
|
+
- name: lambda-wrapper
|
|
84
|
+
run:
|
|
85
|
+
path: sh
|
|
86
|
+
args:
|
|
87
|
+
- -exc
|
|
88
|
+
- |
|
|
89
|
+
cd lambda-wrapper
|
|
90
|
+
semgrep scan --config auto --config p/javascript --config p/nodejs --config p/sql-injection --config p/owasp-top-ten --error --exclude 'node_modules' --exclude 'dist' --exclude 'coverage' --exclude '*.test.js' src/
|
|
91
|
+
|
|
47
92
|
- name: 'migrations.staging'
|
|
48
93
|
serial: true
|
|
49
94
|
plan:
|
|
50
95
|
- in_parallel:
|
|
51
96
|
- get: lambda-wrapper
|
|
97
|
+
passed: ['lint-and-test']
|
|
52
98
|
trigger: true
|
|
53
99
|
- get: concourse-scripts
|
|
54
100
|
- task: 'schema.create'
|
package/.concourse/private.yml
CHANGED
|
Binary file
|
|
@@ -9,11 +9,11 @@ jobs:
|
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
11
|
os: [ ubuntu-latest ]
|
|
12
|
-
node-version: [
|
|
12
|
+
node-version: [ 20.x ]
|
|
13
13
|
if: github.ref == 'refs/heads/main'
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
17
|
|
|
18
18
|
- name: Restore cache
|
|
19
19
|
uses: actions/cache@v4
|
|
@@ -22,15 +22,12 @@ jobs:
|
|
|
22
22
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
|
23
23
|
|
|
24
24
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
26
|
with:
|
|
27
27
|
node-version: ${{ matrix.node-version }}
|
|
28
28
|
|
|
29
|
-
- name:
|
|
30
|
-
run: yarn install
|
|
31
|
-
env:
|
|
32
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: yarn install --frozen-lockfile
|
|
34
31
|
|
|
35
32
|
- run: yarn lint
|
|
36
33
|
env:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: sast
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
semgrep:
|
|
11
|
+
name: Semgrep SAST
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
container:
|
|
14
|
+
image: semgrep/semgrep
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Run Semgrep
|
|
20
|
+
run: semgrep scan --config auto --config p/javascript --config p/nodejs --config p/sql-injection --config p/owasp-top-ten --error --exclude 'node_modules' --exclude 'dist' --exclude 'coverage' --exclude '*.test.js' src/
|