Skip to content

Commit 319c585

Browse files
authored
Merge pull request #449 from owasp-noir/dev
Release v0.18.2
2 parents ab1db56 + 233b2c4 commit 319c585

File tree

12 files changed

+56
-10
lines changed

12 files changed

+56
-10
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If applicable, add screenshots to help explain your problem.
2323

2424
**Versions**
2525
- OS: [e.g. macos, linux]
26-
- Version [e.g. v0.18.1]
26+
- Version [e.g. v0.18.2]
2727

2828
**Additional context**
2929
Add any other context about the problem here.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,7 @@ Noir is open-source project and made it with ❤️
105105
if you want contribute this project, please see [CONTRIBUTING.md](./CONTRIBUTING.md) and Pull-Request with cool your contents.
106106

107107
[![](./CONTRIBUTORS.svg)](https://github.com/owasp-noir/noir/graphs/contributors)
108+
109+
*PassiveScan Rule contributors*
110+
111+
[![](https://raw.githubusercontent.com/owasp-noir/noir-passive-rules/refs/heads/main/CONTRIBUTORS.svg)](https://github.com/owasp-noir/noir-passive-rules/graphs/contributors)

docs/_advanced/tips/community-articles.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ layout: page
77
---
88

99
* [Hello Noir 👋🏼 by HAHWUL](https://www.hahwul.com/2023/08/03/hello-noir/)
10-
* [API Attack Surface Detection using Noir by DANA EPP](https://danaepp.com/api-attack-surface-detection-using-noir)
10+
* [API Attack Surface Detection using Noir by DANA EPP](https://danaepp.com/api-attack-surface-detection-using-noir)
11+
* [Exploring OWASP Noir's PassiveScan by HAHWUL](https://www.hahwul.com/2024/11/03/passivescan-in-owasp-noir/)

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ Happy contributing!
8282

8383
![](https://raw.githubusercontent.com/owasp-noir/noir/refs/heads/main/CONTRIBUTORS.svg)
8484

85+
*PassiveScan Rule contributors*
86+
87+
[![](https://raw.githubusercontent.com/owasp-noir/noir-passive-rules/refs/heads/main/CONTRIBUTORS.svg)](https://github.com/owasp-noir/noir-passive-rules/graphs/contributors)
88+
8589
### Code of Conduct
8690
OWASP Noir is committed to fostering a welcoming community.
8791

shard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Project Metadata
22
name: noir
3-
version: 0.18.1
3+
version: 0.18.2
44
authors:
55
- hahwul <hahwul@gmail.com>
66
- ksg97031 <ksg97031@gmail.com>

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: noir
22
base: core20
3-
version: 0.18.1
3+
version: 0.18.2
44
summary: Attack surface detector that identifies endpoints by static analysis.
55
description: |
66
Noir is an open-source project specializing in identifying attack surfaces for enhanced whitebox security testing and security pipeline.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Rails.application.routes.draw do
22
resources :posts
33
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
4-
4+
55
# Defines the root path route ("/")
66
# root "articles#index"
7-
end
7+
get "up" => "rails/health#show", as: :rails_health_check
8+
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
9+
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
10+
end

spec/functional_test/testers/ruby/rails_spec.cr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ extected_endpoints = [
2222
Param.new("X-API-KEY", "", "header"),
2323
]),
2424
Endpoint.new("/posts/1", "DELETE"),
25+
Endpoint.new("/up", "GET"),
26+
Endpoint.new("/service-worker", "GET"),
27+
Endpoint.new("/manifest", "GET"),
2528
]
2629

2730
FunctionalTester.new("fixtures/ruby/rails/", {

src/completions.cr

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def generate_zsh_completion_script
55
_arguments \\
66
'-b[Set base path]:path:_files' \\
77
'-u[Set base URL for endpoints]:URL:_urls' \\
8-
'-f[Set output format]:format:(plain yaml json jsonl markdown-table curl httpie oas2 oas3 only-url only-param only-header only-cookie)' \\
8+
'-f[Set output format]:format:(plain yaml json jsonl markdown-table curl httpie oas2 oas3 only-url only-param only-header only-cookie only-tag)' \\
99
'-o[Write result to file]:path:_files' \\
1010
'--set-pvalue[Specifies the value of the identified parameter]:value:' \\
1111
'--set-pvalue-header[Specifies the value of the identified parameter for headers]:value:' \\
@@ -19,6 +19,8 @@ _arguments \\
1919
'--include-path[Include file path in the plain result]' \\
2020
'--no-color[Disable color output]' \\
2121
'--no-log[Displaying only the results]' \\
22+
'-P[Perform a passive scan for security issues using rules from the specified path]' \\
23+
'--passive-scan-path[Specify the path for the rules used in the passive security scan]:path:_files' \\
2224
'-T[Activates all taggers for full analysis coverage]' \\
2325
'--use-taggers[Activates specific taggers]:values:' \\
2426
'--list-taggers[Lists all available taggers]' \\
@@ -34,6 +36,7 @@ _arguments \\
3436
'--list-techs[Show all technologies]' \\
3537
'--config-file[Specify the path to a configuration file in YAML format]:path:_files' \\
3638
'--concurrency[Set concurrency]:concurrency:' \\
39+
'--generate-completion[Generate Zsh/Bash/Fish completion script]:completion:(zsh bash fish)' \\
3740
'-d[Show debug messages]' \\
3841
'-v[Show version]' \\
3942
'--build-info[Show version and Build info]' \\
@@ -65,6 +68,8 @@ _noir_completions() {
6568
--include-path
6669
--no-color
6770
--no-log
71+
-P --passive-scan
72+
--passive-scan-path
6873
-T --use-all-taggers
6974
--use-taggers
7075
--list-taggers
@@ -80,6 +85,7 @@ _noir_completions() {
8085
--list-techs
8186
--config-file
8287
--concurrency
88+
--generate-completion
8389
-d --debug
8490
-v --version
8591
--build-info
@@ -88,13 +94,17 @@ _noir_completions() {
8894
8995
case "${prev}" in
9096
-f|--format)
91-
COMPREPLY=( $(compgen -W "plain yaml json jsonl markdown-table curl httpie oas2 oas3 only-url only-param only-header only-cookie" -- "${cur}") )
97+
COMPREPLY=( $(compgen -W "plain yaml json jsonl markdown-table curl httpie oas2 oas3 only-url only-param only-header only-cookie only-tag" -- "${cur}") )
9298
return 0
9399
;;
94100
--send-proxy|--send-es|--with-headers|--use-matchers|--use-filters|--diff-path|--config-file|--set-pvalue|--techs|--exclude-techs|-o|-b|-u)
95101
COMPREPLY=( $(compgen -f -- "${cur}") )
96102
return 0
97103
;;
104+
--generate-completion)
105+
COMPREPLY=( $(compgen -W "zsh bash fish" -- "${cur}") )
106+
return 0
107+
;;
98108
*)
99109
;;
100110
esac
@@ -133,6 +143,8 @@ complete -c noir -n '__fish_noir_needs_command' -a '--exclude-codes' -d 'Exclude
133143
complete -c noir -n '__fish_noir_needs_command' -a '--include-path' -d 'Include file path in the plain result'
134144
complete -c noir -n '__fish_noir_needs_command' -a '--no-color' -d 'Disable color output'
135145
complete -c noir -n '__fish_noir_needs_command' -a '--no-log' -d 'Displaying only the results'
146+
complete -c noir -n '__fish_noir_needs_command' -a '-P' -d 'Perform a passive scan for security issues using rules from the specified path'
147+
complete -c noir -n '__fish_noir_needs_command' -a '--passive-scan-path' -d 'Specify the path for the rules used in the passive security scan'
136148
complete -c noir -n '__fish_noir_needs_command' -a '-T' -d 'Activates all taggers for full analysis coverage'
137149
complete -c noir -n '__fish_noir_needs_command' -a '--use-taggers' -d 'Activates specific taggers'
138150
complete -c noir -n '__fish_noir_needs_command' -a '--list-taggers' -d 'Lists all available taggers'
@@ -148,6 +160,7 @@ complete -c noir -n '__fish_noir_needs_command' -a '--exclude-techs' -d 'Specify
148160
complete -c noir -n '__fish_noir_needs_command' -a '--list-techs' -d 'Show all technologies'
149161
complete -c noir -n '__fish_noir_needs_command' -a '--config-file' -d 'Specify the path to a configuration file in YAML format'
150162
complete -c noir -n '__fish_noir_needs_command' -a '--concurrency' -d 'Set concurrency'
163+
complete -c noir -n '__fish_noir_needs_command' -a '--generate-completion' -d 'Generate Zsh/Bash/Fish completion script'
151164
complete -c noir -n '__fish_noir_needs_command' -a '-d' -d 'Show debug messages'
152165
complete -c noir -n '__fish_noir_needs_command' -a '-v' -d 'Show version'
153166
complete -c noir -n '__fish_noir_needs_command' -a '--build-info' -d 'Show version and Build info'

src/models/logger.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ class NoirLogger
1616
end
1717

1818
def heading(message)
19+
if @no_log
20+
return
21+
end
22+
1923
prefix = "".colorize(:yellow).toggle(@color_mode)
2024
STDERR.puts "#{prefix} #{message}"
2125
end

src/models/noir.cr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ class NoirRunner
139139

140140
@endpoints.each do |endpoint|
141141
tiny_tmp = endpoint
142+
143+
# Remove space in param name
142144
if endpoint.params.size > 0
143145
tiny_tmp.params = [] of Param
144146
endpoint.params.each do |param|
@@ -149,6 +151,15 @@ class NoirRunner
149151
end
150152
end
151153

154+
# Check start with slash
155+
if tiny_tmp.url[0] != "/"
156+
tiny_tmp.url = "/#{tiny_tmp.url}"
157+
end
158+
159+
# Check double slash
160+
tiny_tmp.url = tiny_tmp.url.gsub_repeatedly("//", "/")
161+
162+
# Duplicate check
152163
if tiny_tmp.url != ""
153164
is_new = true
154165
final.each do |dup|

src/noir.cr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require "./options.cr"
66
require "./techs/techs.cr"
77

88
module Noir
9-
VERSION = "0.18.1"
9+
VERSION = "0.18.2"
1010
end
1111

1212
# Run options parser
@@ -54,7 +54,10 @@ if noir_options["exclude_codes"] != ""
5454
end
5555

5656
# Run Noir
57-
banner()
57+
if noir_options["nolog"] == false
58+
banner()
59+
end
60+
5861
app = NoirRunner.new noir_options
5962
start_time = Time.monotonic
6063

0 commit comments

Comments
 (0)