-
Notifications
You must be signed in to change notification settings - Fork 0
[PROD RELEASE V6] #386
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
[PROD RELEASE V6] #386
Changes from all commits
90292d0
24e2a26
eb9dd9b
b1bcabf
42b5c51
4d5d409
41f61fc
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 | ||
|
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. [ |
||
| with: | ||
| scan-type: "fs" | ||
| ignore-unfixed: true | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| severity: "CRITICAL,HIGH,UNKNOWN" | ||
| 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 | ||
|
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. [ |
||
| with: | ||
| sarif_file: "trivy-results.sarif" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,10 +23,10 @@ export const THRIVE_HOST: string = { | |
| }[HOST_ENV] || `https://www.${TC_DOMAIN}`; | ||
|
|
||
| export const APP_AUTH_CONNECTOR: string = `https://accounts-auth0.${TC_DOMAIN}`; | ||
| export const ONLINE_REVIEW_HOST: string = `https://software.${TC_DOMAIN}`; | ||
| export const REVIEW_APP_HOST: string = `https://review.${TC_DOMAIN}`; | ||
| export const TCACADEMY_HOST: string = `https://academy.${TC_DOMAIN}`; | ||
| export const SELF_SERVICE_HOST: string = `https://work.${TC_DOMAIN}`; | ||
| export const TC_API_V5_HOST: string = `https://api.${TC_DOMAIN}/v5`; | ||
| export const TC_API_HOST: string = `https://api.${TC_DOMAIN}/v6`; | ||
|
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. [❗❗ |
||
| export const CONNECT_HOST: string = `https://connect.${TC_DOMAIN}`; | ||
| export const WORK_MANAGER_HOST: string = `https://challenges.${TC_DOMAIN}`; | ||
| export const PROFILE_HOST: string = `https://profiles.${TC_DOMAIN}`; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import { TC_API_V5_HOST } from 'lib/config'; | ||
| import { TC_API_HOST } from 'lib/config'; | ||
| import type { ContactSupportRequest } from './contact-support-request.model' | ||
|
|
||
| export async function sendSupportRequest(request: ContactSupportRequest): Promise<any> { | ||
|
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. [ |
||
| const url: string = `${TC_API_V5_HOST}/challenges/support-requests` | ||
| const url: string = `${TC_API_HOST}/challenges/support-requests` | ||
|
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. [❗❗ |
||
|
|
||
| return fetch(url, { | ||
| method: 'POST', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import type { AuthUser } from '../../main'; | ||
| import { AUTH_USER_ROLE, AUTH_USER_ROLE_VALUES } from '../config/auth'; | ||
| import { TC_API_V5_HOST } from '../config'; | ||
| import { TC_API_HOST } from '../config'; | ||
| import { getAuthJwtDomainProp, getRequestAuthHeaders } from './auth-jwt'; | ||
|
|
||
| export type fetchUserProfileFn = () => AuthUser | null; | ||
|
|
@@ -46,7 +46,7 @@ export const fetchUserProfile = async (): Promise<AuthUser> => { | |
| let resolve: (value: AuthUser) => void; | ||
| localCache[userHandle] = new Promise((r) => {resolve = r}); | ||
|
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. [❗❗ |
||
|
|
||
| const requestUrl: string = `${TC_API_V5_HOST}/members/${userHandle}`; | ||
| const requestUrl: string = `${TC_API_HOST}/members/${userHandle}`; | ||
| const request = fetch(requestUrl, {headers: {...getRequestAuthHeaders()}}); | ||
|
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. [❗❗ |
||
|
|
||
| const response = await (await request).json(); | ||
|
|
||
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 reduce maintenance overhead when new Ubuntu versions are released.