Skip to content

Commit 68f9468

Browse files
authored
Merge pull request #12 from topcoder-platform/develop
[v6 PROD RELEASE] - dev -> master
2 parents e16de74 + e76441c commit 68f9468

File tree

6 files changed

+1509
-431
lines changed

6 files changed

+1509
-431
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ workflows:
6767
branches:
6868
only:
6969
- develop
70+
- pm-2539
7071

7172
# Production builds are exectuted only on tagged commits to the
7273
# master branch.

.github/workflows/trivy.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Trivy Scanner
2+
3+
permissions:
4+
contents: read
5+
security-events: write
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- dev
11+
pull_request:
12+
jobs:
13+
trivy-scan:
14+
name: Use Trivy
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Run Trivy scanner in repo mode
21+
uses: aquasecurity/trivy-action@0.33.1
22+
with:
23+
scan-type: "fs"
24+
ignore-unfixed: true
25+
format: "sarif"
26+
output: "trivy-results.sarif"
27+
severity: "CRITICAL,HIGH,UNKNOWN"
28+
scanners: vuln,secret,misconfig,license
29+
github-pat: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Upload Trivy scan results to GitHub Security tab
32+
uses: github/codeql-action/upload-sarif@v3
33+
with:
34+
sarif_file: "trivy-results.sarif"

config/default.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,6 @@ module.exports = {
121121

122122
HASHING_KEYS: {
123123
USERFLOW: process.env.USERFLOW_PRIVATE_KEY
124-
}
124+
},
125+
MEMBER_SERVICE_PRISMA_TIMEOUT: process.env.MEMBER_SERVICE_PRISMA_TIMEOUT ? parseInt(process.env.MEMBER_SERVICE_PRISMA_TIMEOUT, 10) : 10000,
125126
}

src/common/prisma.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ const {
44
Prisma
55
} = require('../../prisma/generated/client')
66
const { PrismaClient: SkillsPrismaClient } = require('../../prisma/generated/skills-client')
7+
const config = require('config')
78

89
const clientOptions = {
10+
transactionOptions: {
11+
timeout: config.MEMBER_SERVICE_PRISMA_TIMEOUT,
12+
},
913
log: [
1014
{ level: 'query', emit: 'event' },
1115
{ level: 'info', emit: 'event' },

0 commit comments

Comments
 (0)