Skip to content

Commit d637f8f

Browse files
authored
Merge pull request #35 from advanced-security/webgoat-synthetic-guidance
WebGoat Synthetic Guidance Updates
2 parents 63620c4 + 9c658ef commit d637f8f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

code-scanning-guides/synthetic-applications/owasp-webgoat.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ Scanning OWASP WebGoat can have some issues right out of the box where CodeQL mi
88
This is due to the following:
99

1010
1. WebGoat uses JDK 17
11-
- Action uses JDK 8 by default
11+
- Action uses a different JDK by default. Use the `actions/setup-java` action.
1212
2. Uses Project Lombok
13-
- Future support will be coming to CodeQL natively
13+
- [support added to CodeQL natively in v2.14.4](https://github.blog/changelog/2023-09-01-code-scanning-with-codeql-improves-support-for-java-codebases-that-use-project-lombok/)
1414
3. Dependencies are not all present in Dependency Graph
15-
- Using [Submission API](https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api#using-pre-made-actions)
15+
- Using [Submission API](https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api#using-pre-made-actions)
16+
4. Vulnerabilities not detected.
17+
- Enhance CodeQL to use a custom configuration file that broadens the threat model and pulls in additional expirmental, low precision, and community packs/queries. Note that this may include alerts with elevated false positive rates due to lower precision.
18+
- See: [Synthetics.yml](https://github.com/GitHubSecurityLab/CodeQL-Community-Packs/tree/main/configs#synthetics)
19+
- The default threat model includes remote sources of untrusted data. This config will also [expand the threat model to include local sources](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models): `threat-models: local`

code-scanning-guides/synthetic-applications/owasp-webgoat.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ permissions:
1313
contents: read
1414
security-events: write
1515

16-
env:
17-
# Lombok support is now included by default, this is no longer needed
18-
# CODEQL_EXTRACTOR_JAVA_RUN_ANNOTATION_PROCESSORS: true
19-
2016
jobs:
2117
analyze:
2218
name: Analyze
@@ -28,34 +24,34 @@ jobs:
2824
language: [ 'java', 'javascript' ]
2925

3026
steps:
31-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
3228

3329
# WebGoat requires Java/JDK 17
3430
- name: Set up JDK 17
3531
if: matrix.language == 'java'
36-
uses: actions/setup-java@v3
32+
uses: actions/setup-java@v4
3733
with:
3834
distribution: 'temurin'
3935
java-version: 17
4036
architecture: x64
4137

4238
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v2
39+
uses: github/codeql-action/init@v3
4440
with:
4541
languages: ${{ matrix.language }}
4642
# [optional] enabled extended queries
4743
# queries: +security-extended,security-and-quality
4844
# [optional] Field Config - standard packs, extensions, and extra packs
49-
config-file: advanced-security/codeql-queries/config/codeql.yml@main
45+
config-file: GitHubSecurityLab/CodeQL-Community-Packs/configs/synthetics.yml@main
5046

5147
- name: Autobuild
52-
uses: github/codeql-action/autobuild@v2
48+
uses: github/codeql-action/autobuild@v3
5349

5450
# Run the Analysis
5551
- name: Perform CodeQL Analysis
56-
uses: github/codeql-action/analyze@v2
52+
uses: github/codeql-action/analyze@v3
5753

5854
# Submit Maven Dependency Tree to GitHub
5955
- name: Maven Dependency Tree Dependency Submission
6056
if: matrix.language == 'java'
61-
uses: advanced-security/maven-dependency-submission-action@v3.0.2
57+
uses: advanced-security/maven-dependency-submission-action@v3

0 commit comments

Comments
 (0)