shield_ast 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shield_ast/version.rb +1 -1
- data/lib/shield_ast.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6c939647ea823bcc6ab0e154d45ae601348a1d6be7dd3ff5d042a2bd789141f
|
4
|
+
data.tar.gz: c9f1d745bc005ed3d7c904cf23d09e62094560ee490b3771289ec224de34437d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83cfc9f81a86de10ccbaaee5950d5495afeb380d73b674438345619e954c05f5a0fcf9b402fe285af83bfc7880642103b48579ea0a898dac71a372ae9e847b34
|
7
|
+
data.tar.gz: dd36eef5cb01fb5ae39025fdae774b9fa33689f96b3feacda4671544c6c778274c4f4676633b360105968b57abcaa8873c28a40a06e304357802496b8439741c
|
data/lib/shield_ast/version.rb
CHANGED
data/lib/shield_ast.rb
CHANGED
@@ -15,9 +15,9 @@ module ShieldAst
|
|
15
15
|
|
16
16
|
# Main class for the Shield AST command-line tool.
|
17
17
|
class Main
|
18
|
-
SCAN_DATA_FILE = File.join(Dir.pwd, "
|
19
|
-
REPORT_JSON_FILE = File.join(Dir.pwd, "
|
20
|
-
REPORT_PDF_FILE = File.join(Dir.pwd, "
|
18
|
+
SCAN_DATA_FILE = File.join(Dir.pwd, "reports", "scan_data.json")
|
19
|
+
REPORT_JSON_FILE = File.join(Dir.pwd, "reports", "scan_report.json")
|
20
|
+
REPORT_PDF_FILE = File.join(Dir.pwd, "reports", "scan_report.pdf")
|
21
21
|
PDF_TEMPLATE = File.join(__dir__, "reports", "templates", "pdf_report_template.rb")
|
22
22
|
|
23
23
|
def self.call(args)
|
@@ -321,7 +321,7 @@ module ShieldAst
|
|
321
321
|
severity_icon = get_severity_icon(result[:severity] || result["severity"] || result[:extra]&.[](:severity) || result["extra"]&.[]("severity"))
|
322
322
|
message = result[:extra]&.[](:message) || result["extra"]&.[]("message") || "Unknown issue"
|
323
323
|
title = message.split(".")[0].strip
|
324
|
-
file_info = "#{
|
324
|
+
file_info = "#{result[:path] || result["path"] || "N/A"}:#{result[:start]&.[](:line) || result["start"]&.[]("line") || "N/A"}"
|
325
325
|
|
326
326
|
puts " #{severity_icon} #{title}"
|
327
327
|
puts " 📁 #{file_info} | #{(result[:extra]&.[](:message) || result["extra"]&.[]("message") || "No description available")[0..80]}..."
|