scnr-introspector 0.3.0 → 0.3.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/scnr/introspector/data_flow/sink.rb +2 -2
- data/lib/scnr/introspector/version +1 -1
- data/lib/scnr/introspector.rb +10 -1
- metadata +5 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 846398e37d66803faee372c4cb3d162aa8e43846a99c36fa369d641c785f6a8f
|
|
4
|
+
data.tar.gz: fbecc1af26e329a7a8ea7f3a9b2cba671acaeab7a90d6f4517f0ebbd59c0be9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3a55cfa7f4b6cf5cfd44e321ce95d918735ebb55293c41e9291670bad567a7d838429bec993299ca32ced4822b131727f1df0a5f5ce6c7e5d2f512bc16ecbc2
|
|
7
|
+
data.tar.gz: e61ac2e28a1fcf4c7cca40946b2f1285d8477f4e6488e1e89f17376e63653358ae315e527a8ce8112323a5f59f07eff7fa337523dc8b5584840f2257f5ca6b3b
|
|
@@ -34,7 +34,7 @@ class Sink
|
|
|
34
34
|
filepath = @method_source_location.first
|
|
35
35
|
lineno = @method_source_location.last
|
|
36
36
|
|
|
37
|
-
if File.
|
|
37
|
+
if File.exist? filepath
|
|
38
38
|
File.open filepath do |f|
|
|
39
39
|
begin
|
|
40
40
|
@method_source = MyMethodSource::CodeHelpers.expression_at( File.open( f ), lineno )
|
|
@@ -46,7 +46,7 @@ class Sink
|
|
|
46
46
|
|
|
47
47
|
if !@source && @backtrace
|
|
48
48
|
source_location = @backtrace.first.split( ':' ).first
|
|
49
|
-
if File.
|
|
49
|
+
if File.exist? source_location
|
|
50
50
|
@source = IO.read( source_location )
|
|
51
51
|
end
|
|
52
52
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.2
|
data/lib/scnr/introspector.rb
CHANGED
|
@@ -31,6 +31,13 @@ class Introspector
|
|
|
31
31
|
method_source_location = object.allocate.method(m).source_location
|
|
32
32
|
rnd = SecureRandom.hex(10)
|
|
33
33
|
|
|
34
|
+
msg = "[INTROSPECTOR] Injecting trace code for #{object}##{m}"
|
|
35
|
+
if method_source_location
|
|
36
|
+
msg << " in #{method_source_location.join(':')}"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
puts msg
|
|
40
|
+
|
|
34
41
|
ov = <<EORUBY
|
|
35
42
|
module Overloads
|
|
36
43
|
module #{object.to_s.split( '::' ).join}#{rnd}Overload
|
|
@@ -46,7 +53,7 @@ EORUBY
|
|
|
46
53
|
eval ov
|
|
47
54
|
rescue => e
|
|
48
55
|
# puts ov
|
|
49
|
-
# pp
|
|
56
|
+
# pp e
|
|
50
57
|
# pp e.backtrace
|
|
51
58
|
end
|
|
52
59
|
|
|
@@ -168,6 +175,8 @@ EORUBY
|
|
|
168
175
|
@app = app
|
|
169
176
|
@options = options
|
|
170
177
|
|
|
178
|
+
puts "[INTROSPECTOR] Codename SCNR Introspector Initialized."
|
|
179
|
+
|
|
171
180
|
overload_application
|
|
172
181
|
overload_rails if rails?
|
|
173
182
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scnr-introspector
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tasos Laskos
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -30,14 +29,14 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '13.0'
|
|
34
33
|
type: :development
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
39
|
+
version: '13.0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: puma
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,7 +79,6 @@ dependencies:
|
|
|
80
79
|
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
81
|
version: '0'
|
|
83
|
-
description:
|
|
84
82
|
email:
|
|
85
83
|
- tasos.laskos@gmail.com
|
|
86
84
|
executables: []
|
|
@@ -107,7 +105,6 @@ homepage: http://ecsypno.com
|
|
|
107
105
|
licenses:
|
|
108
106
|
- Commercial
|
|
109
107
|
metadata: {}
|
|
110
|
-
post_install_message:
|
|
111
108
|
rdoc_options: []
|
|
112
109
|
require_paths:
|
|
113
110
|
- lib
|
|
@@ -122,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
119
|
- !ruby/object:Gem::Version
|
|
123
120
|
version: '0'
|
|
124
121
|
requirements: []
|
|
125
|
-
rubygems_version: 3.
|
|
126
|
-
signing_key:
|
|
122
|
+
rubygems_version: 3.6.9
|
|
127
123
|
specification_version: 4
|
|
128
124
|
summary: Rack application security scanner built around the SCNR::Engine.
|
|
129
125
|
test_files: []
|