Skip to content

Commit 5edc0f0

Browse files
vaibhavbhalla2505Vaibhav  BhallaSunny  Tyagia-ganguly
authored
feat(ci-cd): add trivy scan (#2293)
* feat(ci-cd): add trivy scan GH-2292 * checking deps * update test case * update readme file --------- Co-authored-by: Vaibhav Bhalla <vaibhav.bhalla@SFSupports-MacBook-Air.local> Co-authored-by: Sunny Tyagi <sunny.tyagi@Sunny-SFIN1189.local> Co-authored-by: a-ganguly <abir.ganguly@sourcefuse.com>
1 parent 8bdd270 commit 5edc0f0

13 files changed

Lines changed: 9734 additions & 3387 deletions

File tree

.github/workflows/trivy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Trivy Scan
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
pull_request:
9+
branches: [master]
10+
types: [opened, synchronize, reopened]
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
# This workflow contains a single job called "trivy"
15+
trivy:
16+
# The type of runner that the job will run on
17+
runs-on: [self-hosted, linux, codebuild]
18+
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v3
23+
24+
- name: Run Trivy vulnerability scanner in repo mode
25+
uses: aquasecurity/trivy-action@0.28.0
26+
with:
27+
scan-type: "fs"
28+
scan-ref: "${{ github.workspace }}"
29+
trivy-config: "${{ github.workspace }}/trivy.yaml"

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<a href="https://sonarcloud.io/summary/new_code?id=sourcefuse_loopback4-microservice-catalog" target="_blank">
1111
<img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/sourcefuse_loopback4-microservice-catalog?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge">
1212
</a>
13-
<a href="https://app.snyk.io/org/ashishkaushik/reporting?context[page]=issues-detail&project_target=%255B%2522sourcefuse%252Floopback4-microservice-catalog%2522%255D&project_origin=%255B%2522github%2522%255D&issue_status=%255B%2522Open%2522%255D&issue_by=Severity&table_issues_detail_cols=SCORE%257CCVE%257CCWE%257CPROJECT%257CEXPLOIT%2520MATURITY%257CAUTO%2520FIXABLE%257CINTRODUCED%257CSNYK%2520PRODUCT&v=1">
14-
<img alt="Synk Status" src="https://img.shields.io/badge/SYNK_SECURITY-MONITORED-GREEN?style=for-the-badge">
15-
</a>
1613
<a href="./LICENSE">
1714
<img src="https://img.shields.io/github/license/sourcefuse/loopback4-microservice-catalog?style=for-the-badge" alt="License" />
1815
</a>

package-lock.json

Lines changed: 9649 additions & 3375 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
},
4242
"oidc-provider": {
4343
"@koa/cors": "^5.0.0"
44+
},
45+
"loopback4-notifications": {
46+
"twilio": {
47+
"axios": "^1.8.2"
48+
}
4449
}
4550
},
4651
"dependencies": {

sandbox/chat-notification-pubnub-example/services/notifications-service/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/chat-notification-pubnub-example/services/notifications-service/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"loopback-connector-kv-redis": "^4.0.0",
7070
"loopback-connector-postgresql": "^7.1.1",
7171
"loopback4-authorization": "^7.0.2",
72-
"loopback4-notifications": "^8.0.3",
72+
"loopback4-notifications": "^9.0.1",
7373
"nodemailer": "^6.7.5",
7474
"prom-client": "^14.0.1",
7575
"pubnub": "^7.2.3",
@@ -92,6 +92,15 @@
9292
},
9393
"node-apn": {
9494
"node-forge": "^1.3.1"
95+
},
96+
"axios": "^1.8.2",
97+
"twilio": {
98+
"axios": "^1.8.2"
99+
},
100+
"loopback4-notifications": {
101+
"twilio": {
102+
"axios": "^1.8.2"
103+
}
95104
}
96105
}
97106
}

sandbox/chat-notification-socketio-example/services/notifications-service/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/chat-notification-socketio-example/services/notifications-service/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"loopback-connector-kv-redis": "^4.0.0",
6969
"loopback-connector-postgresql": "^7.1.1",
7070
"loopback4-authorization": "^7.0.2",
71-
"loopback4-notifications": "^8.0.3",
71+
"loopback4-notifications": "^9.0.1",
7272
"nodemailer": "^6.7.5",
7373
"prom-client": "^14.0.1",
7474
"socket.io-client": "^4.5.1",
@@ -89,6 +89,15 @@
8989
},
9090
"node-apn": {
9191
"node-forge": "^1.3.1"
92+
},
93+
"axios": "^1.8.2",
94+
"twilio": {
95+
"axios": "^1.8.2"
96+
},
97+
"loopback4-notifications": {
98+
"twilio": {
99+
"axios": "^1.8.2"
100+
}
92101
}
93102
}
94103
}

sandbox/telemed-app/backend/notification-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"loopback-connector-postgresql": "^7.1.1",
8282
"loopback4-authentication": "^12.1.0",
8383
"loopback4-authorization": "^7.0.2",
84-
"loopback4-notifications": "^8.0.2",
84+
"loopback4-notifications": "^9.0.1",
8585
"pubnub": "^7.2.3",
8686
"swagger-stats": "^0.99.5",
8787
"symlink-resolver": "0.2.1",

services/authentication-service/src/modules/auth/controllers/logout.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class LogoutController {
168168
params.append('refresh_token', refreshTokenModel.externalRefreshToken);
169169
const strToEncode = `${process.env.KEYCLOAK_CLIENT_ID}:${process.env.KEYCLOAK_CLIENT_SECRET}`;
170170
fetch(logoutUrl, {
171-
agent: getProxyAgent(),
171+
agent: getProxyAgent() as unknown as import('http').Agent,
172172
method: 'post',
173173
body: params,
174174
headers: {
@@ -258,7 +258,7 @@ export class LogoutController {
258258
const logoutUrl = `https://oauth2.googleapis.com/revoke?token=${refreshTokenModel.externalAuthToken}`;
259259
params.append('refresh_token', refreshTokenModel.externalRefreshToken);
260260
fetch(logoutUrl, {
261-
agent: getProxyAgent(),
261+
agent: getProxyAgent() as unknown as import('http').Agent,
262262
method: 'post',
263263
body: params,
264264
headers: {

0 commit comments

Comments
 (0)