-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #463 from owasp-noir/dev
Release v0.18.3
- Loading branch information
Showing
21 changed files
with
224 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,45 @@ | ||
--- | ||
name: DeadLink | ||
# Controls when the workflow will run | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Find Broken Link | ||
uses: hahwul/deadfinder@1.4.4 | ||
id: broken-link | ||
with: | ||
command: sitemap | ||
target: https://owasp-noir.github.io/noir/sitemap.xml | ||
- name: Create an issue | ||
uses: dacbd/create-issue-action@main | ||
with: | ||
token: ${{ github.token }} | ||
title: DeadLink Issue | ||
body: | | ||
```json | ||
${{ steps.broken-link.outputs.output }} | ||
``` | ||
name: DeadLink | ||
# Controls when the workflow will run | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Find Broken Link | ||
uses: hahwul/deadfinder@1.5.0 | ||
id: broken-link | ||
with: | ||
command: sitemap | ||
target: https://owasp-noir.github.io/noir/sitemap.xml | ||
|
||
- name: Create Markdown Table from JSON | ||
id: create-markdown-table | ||
run: | | ||
echo "## DeadLink Report" > deadlink_report.md | ||
echo "" >> deadlink_report.md | ||
echo "| Target URL | Deadlink |" >> deadlink_report.md | ||
echo "|------------|------------|" >> deadlink_report.md | ||
echo '${{ steps.broken-link.outputs.output }}' | jq -r 'to_entries[] | .key as $k | .value[] | "| \($k) | \(.) |"' >> deadlink_report.md | ||
- name: Read Markdown Table from File | ||
id: read-markdown-table | ||
run: | | ||
table_content=$(cat deadlink_report.md) | ||
echo "TABLE_CONTENT<<EOF" >> $GITHUB_ENV | ||
echo "$table_content" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Create an issue | ||
uses: dacbd/create-issue-action@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: DeadLink Issue | ||
body: ${{ env.TABLE_CONTENT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Pipeline for DAST | ||
parent: Tips | ||
has_children: false | ||
nav_order: 3 | ||
layout: page | ||
--- | ||
|
||
## Proxy Tool Integration | ||
|
||
This command automates the use of a proxy tool in a security testing pipeline. noir is used with the `-b` option to specify the base directory (.) and -u to target a local application (http://localhost.hahwul.com:3000). The --send-proxy parameter directs traffic to a proxy server running on http://localhost:8090. This setup allows for monitoring and intercepting HTTP requests through tools like ZAP, Caido, or Burp Suite during the testing process. | ||
|
||
```bash | ||
noir -b . -u http://localhost.hahwul.com:3000 --send-proxy "http://localhost:8090" | ||
``` | ||
|
||
## ZAP Integration | ||
|
||
The process begins with endpoint discovery using noir, which scans the application source code in the specified directory (~/app_source), generates an OpenAPI specification (doc.json), and saves it in JSON format. | ||
|
||
Next, the doc.json file is used in an automated ZAP scan. The zap.sh script, with the `-openapifile` option, loads the generated endpoints and uses `-openapitargeturl` to specify the target URL for testing. The `-cmd` and `-autorun` options allow for automated execution of ZAP commands based on zap.yaml, along with any additional configuration parameters. This setup enables comprehensive vulnerability assessment across discovered endpoints in the target application. | ||
|
||
```bash | ||
# Discovering endpoints | ||
noir -b ~/app_source -f oas3 --no-log -o doc.json | ||
|
||
# Automation scan with endpoints | ||
./zap.sh -openapifile ./doc.json \ | ||
-openapitargeturl <TARGET> \ | ||
-cmd -autorun zap.yaml <any other ZAP options> | ||
``` | ||
|
||
For further details on integrating Noir and ZAP for enhanced DAST capabilities, refer to the [Powering Up DAST with ZAP and Noir](https://www.zaproxy.org/blog/2024-11-11-powering-up-dast-with-zap-and-noir/) ZAP blog post. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
spec/functional_test/fixtures/java/spring/src/RequestMethodClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.test; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RequestMapping(value = "/empty") // Comment | ||
|
||
public class RequestMethodClass { | ||
|
||
@GetMapping("") | ||
public void getData() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.