Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.

Commit de00055

Browse files
authored
Merge pull request #6 from aws-samples/minor-fix
Fix the rule ids of some code examples.
2 parents 3367a01 + 6c5b36f commit de00055

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ruby/detectors/tainted-format/tainted-format-compliant.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SPDX-License-Identifier: Apache-2.0
44
=end
55

6-
# {fact rule=untrusted-format-strings@v1.0 defects=0}
6+
# {fact rule=tainted-format@v1.0 defects=0}
77
class TaintedFormat < ActionController::Base
88
def sanitized_input
99
# Compliant: User-input is not used to format output.

src/ruby/detectors/tainted-format/tainted-format-noncompliant.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SPDX-License-Identifier: Apache-2.0
44
=end
55

6-
# {fact rule=untrusted-format-strings@v1.0 defects=1}
6+
# {fact rule=tainted-format@v1.0 defects=1}
77
class TaintedFormat < ActionController::Base
88
def unsanitized_input
99
# Noncompliant: untrusted user input is being used directly in format sting.

src/ruby/detectors/untrusted-file-open/untrusted-file-open.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
SPDX-License-Identifier: Apache-2.0
44
=end
55

6-
# {fact rule=autoescape-disabled@v1.0 defects=0}
6+
# {fact rule=untrusted-file-open@v1.0 defects=0}
77
filename = "testfile"
88
# Compliant: File being opened is static.
99
open(filename) do |f|
1010
print f.gets
1111
end
1212
# {/fact}
1313

14-
# {fact rule=autoescape-disabled@v1.0 defects=1}
14+
# {fact rule=untrusted-file-open@v1.0 defects=1}
1515

1616
# Noncompliant: User-input directly controls which file is opened.
1717
cmd = open("|%s" % params[:file)

0 commit comments

Comments
 (0)