Skip to content

Commit fba4fcd

Browse files
authored
Merge pull request #309 from basecamp/flavorjones-brakeman-ignore-markdown-class-eval
lint: tell brakeman 7 to ignore the class eval in has_markdown
2 parents d1e1a74 + 0469aaf commit fba4fcd

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

config/brakeman.ignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"ignored_warnings": [
3+
{
4+
"warning_type": "Dangerous Eval",
5+
"warning_code": 13,
6+
"fingerprint": "e150f325ca5214b108b537c408e52292bfcee725d435b6871a494068dd1b51c2",
7+
"check_name": "Evaluation",
8+
"message": "Dynamic string evaluated as code",
9+
"file": "lib/rails_ext/action_text_has_markdown.rb",
10+
"line": 7,
11+
"link": "https://brakemanscanner.org/docs/warning_types/dangerous_eval/",
12+
"code": "class_eval(\" def #{name}\\n markdown_#{name} || build_markdown_#{name}\\n end\\n\\n def #{name}?\\n markdown_#{name}.present?\\n end\\n\\n def #{name}=(content)\\n self.#{name}.content = content\\n end\\n\", \"lib/rails_ext/action_text_has_markdown.rb\", 8)",
13+
"render_path": null,
14+
"location": {
15+
"type": "method",
16+
"class": "ActionText::HasMarkdown",
17+
"method": "has_markdown"
18+
},
19+
"user_input": null,
20+
"confidence": "Weak",
21+
"cwe_id": [
22+
913,
23+
95
24+
],
25+
"note": ""
26+
}
27+
],
28+
"brakeman_version": "7.0.0"
29+
}

0 commit comments

Comments
 (0)