Skip to content

Commit

Permalink
fix: move ftp rule to ruby lang folder
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Jan 30, 2023
1 parent 0b7157c commit a35a283
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 37 deletions.
20 changes: 10 additions & 10 deletions integration/rules/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ func TestRubyLangHttpPostInsecureWithDataDataflow(t *testing.T) {
runRulesTest("ruby/lang/http_post_insecure_with_data", "dataflow", t)
}

func TestRubyLangInsecureFtpSummary(t *testing.T) {
t.Parallel()
runRulesTest("ruby/lang/insecure_ftp", "summary", t)
}

func TestRubyLangInsecureFtpDataflow(t *testing.T) {
t.Parallel()
runRulesTest("ruby/lang/insecure_ftp", "dataflow", t)
}

func TestRubyLangJwtSummary(t *testing.T) {
t.Parallel()
runRulesTest("ruby/lang/jwt", "summary", t)
Expand Down Expand Up @@ -144,16 +154,6 @@ func TestRubyRailsInsecureCommunicationDataflow(t *testing.T) {
runRulesTest("ruby/rails/insecure_communication", "dataflow", t)
}

func TestRubyRailsInsecureFtpSummary(t *testing.T) {
t.Parallel()
runRulesTest("ruby/rails/insecure_ftp", "summary", t)
}

func TestRubyRailsInsecureFtpDataflow(t *testing.T) {
t.Parallel()
runRulesTest("ruby/rails/insecure_ftp", "dataflow", t)
}

func TestRubyRailsInsecureSmtpSummary(t *testing.T) {
t.Parallel()
runRulesTest("ruby/rails/insecure_smtp", "summary", t)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ metadata:
## Resources
- [net-sftp](https://github.com/net-ssh/net-sftp)
dsr_id: "DSR-2"
id: "ruby_rails_insecure_ftp"
id: "ruby_lang_insecure_ftp"
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
detectors:
- name: ruby
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
line_number: 5
field_name: email
object_name: User
- name: Fullname
detectors:
- name: ruby
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
line_number: 5
field_name: name
object_name: User
- name: Passwords
detectors:
- name: ruby
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
line_number: 5
field_name: password
object_name: User
risks:
- detector_id: ruby_rails_insecure_ftp
- detector_id: ruby_lang_insecure_ftp
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
line_number: 8
parent:
line_number: 8
content: Net::FTP.new("ftp.ruby-lang.org")
content: |
Net::FTP.new()
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
line_number: 8
parent:
line_number: 8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
risks:
- detector_id: ruby_rails_insecure_ftp
- detector_id: ruby_lang_insecure_ftp
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -16,7 +16,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -31,7 +31,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -46,7 +46,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -61,7 +61,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
line_number: 3
parent:
line_number: 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
detectors:
- name: ruby
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 6
field_name: email
object_name: user
risks:
- detector_id: ruby_rails_insecure_ftp
- detector_id: ruby_lang_insecure_ftp
data_types:
- name: Email Address
stored: false
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 6
parent:
line_number: 3
Expand All @@ -34,7 +34,7 @@
- name: Unique Identifier
stored: false
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 6
parent:
line_number: 3
Expand All @@ -51,9 +51,9 @@
end
end
object_name: user
- detector_id: ruby_rails_insecure_ftp
- detector_id: ruby_lang_insecure_ftp
locations:
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -73,7 +73,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 3
parent:
line_number: 3
Expand All @@ -93,7 +93,7 @@
$<!>Net::FTP.open() do
$<_>
end
- filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
- filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
line_number: 3
parent:
line_number: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
critical:
- policy_name: ""
policy_dsrid: DSR-2
policy_display_id: ruby_rails_insecure_ftp
policy_display_id: ruby_lang_insecure_ftp
policy_description: Only communicate using SFTP connections.
line_number: 8
filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_new.rb
filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_new.rb
category_groups:
- PII
parent_line_number: 8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
low:
- policy_name: ""
policy_dsrid: DSR-2
policy_display_id: ruby_rails_insecure_ftp
policy_display_id: ruby_lang_insecure_ftp
policy_description: Only communicate using SFTP connections.
line_number: 3
filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open.rb
filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open.rb
parent_line_number: 3
parent_content: |-
Net::FTP.open("example.com") do |ftp|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
critical:
- policy_name: ""
policy_dsrid: DSR-2
policy_display_id: ruby_rails_insecure_ftp
policy_display_id: ruby_lang_insecure_ftp
policy_description: Only communicate using SFTP connections.
line_number: 3
filename: pkg/commands/process/settings/rules/ruby/rails/insecure_ftp/testdata/ftp_open_with_datatype.rb
filename: pkg/commands/process/settings/rules/ruby/lang/insecure_ftp/testdata/ftp_open_with_datatype.rb
category_groups:
- PII
parent_line_number: 3
Expand Down

0 comments on commit a35a283

Please sign in to comment.