File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ import {
1919} from 'src/shared/topcoder/challenges.service' ;
2020import { Logger } from 'src/shared/global' ;
2121
22+ function formatDate ( date = new Date ( ) ) {
23+ const pad = ( n , z = 2 ) => String ( n ) . padStart ( z , '0' ) ;
24+
25+ return (
26+ `${ date . getFullYear ( ) } -${ pad ( date . getMonth ( ) + 1 ) } -${ pad ( date . getDate ( ) ) } ` +
27+ `${ pad ( date . getHours ( ) ) } :${ pad ( date . getMinutes ( ) ) } :${ pad ( date . getSeconds ( ) ) } .` +
28+ `${ pad ( date . getMilliseconds ( ) , 3 ) } `
29+ ) ;
30+ }
31+
2232/**
2333 * The admin winning service.
2434 */
@@ -322,7 +332,7 @@ export class AdminService {
322332 userId : + winning . winner_id ,
323333 status : body . paymentStatus ,
324334 amount : body . paymentAmount ,
325- releaseDate : body . releaseDate ,
335+ releaseDate : formatDate ( new Date ( body . releaseDate ) ) ,
326336 } ;
327337
328338 await this . tcChallengesService . updateLegacyPayments (
You can’t perform that action at this time.
0 commit comments