-
Notifications
You must be signed in to change notification settings - Fork 0
tester #53
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
base: 923
Are you sure you want to change the base?
tester #53
Changes from all commits
8219842
721edc9
3e8dbc9
abf431f
ee1d4b0
b76330f
b858484
b3f7a53
5d45fd6
d0f36f5
94f79f8
0e92e6c
ec5930e
28978bc
3740a5a
fd922a3
d2445d7
1d38bf6
166ac47
dc3886d
3704c23
14b7a37
8811fd5
054efc1
00fa190
0ba935f
53cf77e
91e265a
94631a3
a42d1da
7242f74
c64d856
83c6204
87f0395
ae72802
074f271
6eaabed
e0fdaff
b94e51c
28ff93d
190b121
cf90f7d
518ec71
78af38a
2470d24
02dca8a
b8ec34d
d460764
4c97575
c083b42
51550d1
1f24651
5718f00
04c1c7f
17826b0
d786854
f0a5a28
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 |
|---|---|---|
| @@ -1,41 +1,21 @@ | ||
| name: "Build" | ||
| on: | ||
| push: | ||
| branches: [ '*' ] | ||
| tags-ignore: | ||
| - '*' | ||
|
|
||
| name: GitHub Actions Demo | ||
| on: [push] | ||
| jobs: | ||
| build: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| java: [11, 15] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up JDK ${{ matrix.java }} | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: ${{ matrix.java }} | ||
| architecture: x64 | ||
| - name: Cache Maven packages | ||
| uses: actions/cache@v2.1.4 | ||
| with: | ||
| path: ~/.m2 | ||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: ${{ runner.os }}-m2 | ||
| - name: Build with Maven | ||
| run: mvn clean install | ||
|
|
||
| notify-slack: | ||
| if: github.event_name == 'push' && (success() || failure()) | ||
| needs: | ||
| - build | ||
| Explore-GitHub-Actions: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Slack workflow notification" | ||
| uses: Gamesight/slack-workflow-status@master | ||
| with: | ||
| repo_token: ${{secrets.GITHUB_TOKEN}} | ||
| slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} | ||
| - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
| - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
| - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
| - name: Check out repository code | ||
| uses: actions/checkout@v2 | ||
| - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
| - run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
| - name: List files in the repository | ||
| run: | | ||
| ls ${{ github.workspace }} | ||
| - run: echo "🍏 This job's status is ${{ job.status }}." | ||
|
|
||
| branches: | ||
| - master # or the name of your main branch | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # This workflow integrates ShiftLeft NG SAST with GitHub | ||
| # Visit https://docs.shiftleft.io for help | ||
| name: ShiftLeft | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
| push: | ||
| # We recommend triggering a scan when merging to your default branch as a best practice, | ||
| # especially if you'd like to compare the results of two scans (e.g., a feature branch against the | ||
| # default branch) | ||
| branches: | ||
| - main | ||
| - master | ||
| jobs: | ||
| NextGen-Static-Analysis: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Download ShiftLeft CLI | ||
| run: | | ||
| curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl | ||
|
Comment on lines
+20
to
+22
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. 4. Shiftleft cli downloaded without integrity check The ShiftLeft workflow downloads a binary from a CDN URL via curl and immediately marks it executable and runs it — with no checksum or signature verification. A compromised CDN or MITM attack would result in arbitrary code execution in the CI runner with access to SHIFTLEFT_ACCESS_TOKEN and GITHUB_TOKEN. Agent Prompt
|
||
| # ShiftLeft requires Java 1.8. Post the package step override the version | ||
| - name: Setup Java JDK | ||
| uses: actions/setup-java@v1.4.3 | ||
| with: | ||
| java-version: 1.8 | ||
| - name: NextGen Static Analysis | ||
| run: ${GITHUB_WORKSPACE}/sl analyze --app ShiftLeftJS --tag branch=${{ github.head_ref }} --js --cpg $(pwd) | ||
| env: | ||
| SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| on: | ||
| # Trigger analysis when pushing in master or pull requests, and when creating | ||
| # a pull request. | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| name: SonarCloudHamid | ||
| jobs: | ||
| sonarqube: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| # Disabling shallow clone is recommended for improving relevancy of reporting | ||
| fetch-depth: 0 | ||
| - name: SonarQube Scan | ||
| uses: sonarsource/sonarqube-scan-action@master | ||
| env: | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: SonarPass12 | ||
| on: | ||
| push: | ||
| branches: | ||
| - 891 # or the name of your main branch | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
| - name: Set up JDK 11 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 11 | ||
| - name: Cache SonarQube packages | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.sonar/cache | ||
| key: ${{ runner.os }}-sonar | ||
| restore-keys: ${{ runner.os }}-sonar | ||
| - name: Cache Maven packages | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.m2 | ||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: ${{ runner.os }}-m2 | ||
| - name: Build and analyze | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
| run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=WebGoat |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| pipeline { | ||
| agent any | ||
|
|
||
| stages { | ||
| stage('Do Nothing') { | ||
| steps { | ||
| echo 'Doing Nothing..' | ||
| } | ||
| } | ||
| stage('Test Nothing') { | ||
| steps { | ||
| echo 'Testing Nothing..' | ||
| } | ||
| } | ||
| stage('Deploy') { | ||
| steps { | ||
| echo 'Deploying....' | ||
| sh '''#!/bin/bash | ||
| mvn deploy | ||
| ''' | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Build | ||
| on: | ||
| push: | ||
| branches: | ||
| - master # or the name of your main branch | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
| - name: Set up JDK 11 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 11 | ||
| - name: Cache SonarQube packages | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.sonar/cache | ||
| key: ${{ runner.os }}-sonar | ||
| restore-keys: ${{ runner.os }}-sonar | ||
| - name: Cache Maven packages | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: ~/.m2 | ||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: ${{ runner.os }}-m2 | ||
| - name: Build and analyze | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
| run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=WebGoat |
This file was deleted.
This file was deleted.
This file was deleted.
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.
2. Github actions branches filter misplaced
🐞 Bug✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools