-
Notifications
You must be signed in to change notification settings - Fork 1
[v6 PROD RELEASE] - dev -> master #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f3e1b7d
6437ae5
5854392
f0d1918
0cd6ee3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Trivy Scanner | ||
|
|
||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
| jobs: | ||
| trivy-scan: | ||
| name: Use Trivy | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Trivy scanner in repo mode | ||
| uses: aquasecurity/trivy-action@0.33.1 | ||
| with: | ||
| scan-type: "fs" | ||
| ignore-unfixed: true | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| severity: "CRITICAL,HIGH,UNKNOWN" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| scanners: vuln,secret,misconfig,license | ||
| github-pat: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Upload Trivy scan results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: "trivy-results.sarif" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| -- CreateIndex | ||
| CREATE INDEX "Group_status_organizationId_idx" ON "Group"("status", "organizationId"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "Group_domain_idx" ON "Group"("domain"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "Group_ssoId_idx" ON "Group"("ssoId"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "Group_privateGroup_status_idx" ON "Group"("privateGroup", "status"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "GroupMember_memberId_membershipType_idx" ON "GroupMember"("memberId", "membershipType"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "User_universalUID_idx" ON "User"("universalUID"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,10 @@ model Group { | |
| @@index([name]) // Index for filtering by name | ||
| @@index([status]) // Index for filtering by status | ||
| @@index([oldId]) // Index for filtering by oldId | ||
| @@index([status, organizationId]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| @@index([domain]) | ||
| @@index([ssoId]) | ||
| @@index([privateGroup, status]) | ||
| } | ||
|
|
||
| model GroupMembership { | ||
|
|
@@ -63,7 +67,8 @@ model GroupMembership { | |
| @@unique([groupId, memberId]) | ||
| @@index([groupId]) // Index for joining with group table | ||
| @@index([memberId]) // Index for filtering by memberId | ||
| @@map("GroupMember") | ||
| @@index([memberId, membershipType]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| @@map("GroupMember") | ||
| } | ||
|
|
||
| // This user table is only used in this group challenge | ||
|
|
@@ -74,4 +79,6 @@ model User { | |
| createdBy String | ||
| updatedAt DateTime @updatedAt | ||
| updatedBy String? | ||
|
|
||
| @@index([universalUID]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,11 @@ export class PrismaService | |
|
|
||
| constructor(private readonly prismaErrorService?: PrismaErrorService) { | ||
| super({ | ||
| transactionOptions: { | ||
| timeout: process.env.GROUPS_SERVICE_PRISMA_TIMEOUT | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| ? parseInt(process.env.GROUPS_SERVICE_PRISMA_TIMEOUT, 10) | ||
| : 10000, | ||
| }, | ||
| log: [ | ||
| { level: 'query', emit: 'event' }, | ||
| { level: 'info', emit: 'event' }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
maintainability]Consider using a stable version of the runner, such as
ubuntu-latest, instead ofubuntu-24.04to ensure compatibility and support. The specific versionubuntu-24.04may not be available or supported in the future.