Skip to content

Commit 3027ed0

Browse files
committed
PWN::Plugins::DefectDojo module - cast comma-delimited string into array #bugfix
1 parent 513efe1 commit 3027ed0

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gem 'aws-sdk', '3.2.0'
1919
gem 'barby', '0.6.9'
2020
gem 'brakeman', '6.1.0'
2121
gem 'bson', '4.15.0'
22-
gem 'bundler', '>=2.5.0'
22+
gem 'bundler', '>=2.5.1'
2323
gem 'bundler-audit', '0.9.1'
2424
gem 'bunny', '2.22.0'
2525
gem 'colorize', '1.1.0'
@@ -54,7 +54,7 @@ gem 'nexpose', '7.3.0'
5454
gem 'nokogiri', '1.15.5'
5555
gem 'nokogiri-diff', '0.2.0'
5656
gem 'oily_png', '1.2.1'
57-
gem 'open3', '0.2.0'
57+
gem 'open3', '0.2.1'
5858
gem 'os', '1.1.4'
5959
gem 'packetfu', '2.0.0'
6060
gem 'packetgen', '3.3.0'
@@ -65,7 +65,7 @@ gem 'pry-doc', '1.4.0'
6565
gem 'rake', '13.1.0'
6666
gem 'rb-readline', '0.5.5'
6767
gem 'rbvmomi', '3.0.0'
68-
gem 'rdoc', '6.6.1'
68+
gem 'rdoc', '6.6.2'
6969
gem 'rest-client', '2.1.0'
7070
gem 'rex', '2.0.13'
7171
gem 'rmagick', '5.3.0'

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.4.936]:001 >>> PWN.help
40+
pwn[v0.4.937]:001 >>> PWN.help
4141
```
4242

4343
[![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.936]:001 >>> PWN.help
55+
pwn[v0.4.937]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.2.2@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.4.936]:001 >>> PWN.help
65+
pwn[v0.4.937]:001 >>> PWN.help
6666
```
6767

6868

lib/pwn/plugins/defect_dojo.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ module DefectDojo
449449
http_body[:lead] = user_by_username_object.first[:id]
450450
end
451451

452-
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub
452+
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
453453

454454
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
455455
case minimum_severity
@@ -555,13 +555,11 @@ module DefectDojo
555555
end
556556
end
557557

558-
tags = opts[:tags].to_s.strip.chomp.scrub
559558
# TODO: wait for solution to:
560559
# https://github.com/DefectDojo/django-DefectDojo/issues/457
561560
# in order to obtain the unique test resource_uri
562561
# by searching tags for unique identifier (would be better to have a unique test names)
563-
564-
http_body[:tags] = tags
562+
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
565563

566564
http_body[:test] = opts[:test_resource_uri] if opts[:test_resource_uri]
567565

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.4.936'
4+
VERSION = '0.4.937'
55
end

0 commit comments

Comments
 (0)