sqreen 0.7.01461158029-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +22 -0
- data/README.md +77 -0
- data/Rakefile +40 -0
- data/lib/sqreen.rb +67 -0
- data/lib/sqreen/binding_accessor.rb +184 -0
- data/lib/sqreen/ca.crt +72 -0
- data/lib/sqreen/callback_tree.rb +78 -0
- data/lib/sqreen/callbacks.rb +120 -0
- data/lib/sqreen/capped_queue.rb +23 -0
- data/lib/sqreen/condition_evaluator.rb +169 -0
- data/lib/sqreen/conditionable.rb +50 -0
- data/lib/sqreen/configuration.rb +151 -0
- data/lib/sqreen/context.rb +22 -0
- data/lib/sqreen/deliveries/batch.rb +80 -0
- data/lib/sqreen/deliveries/simple.rb +36 -0
- data/lib/sqreen/detect.rb +14 -0
- data/lib/sqreen/detect/shell_injection.rb +61 -0
- data/lib/sqreen/detect/sql_injection.rb +115 -0
- data/lib/sqreen/event.rb +16 -0
- data/lib/sqreen/events/attack.rb +60 -0
- data/lib/sqreen/events/remote_exception.rb +53 -0
- data/lib/sqreen/exception.rb +31 -0
- data/lib/sqreen/frameworks.rb +40 -0
- data/lib/sqreen/frameworks/generic.rb +243 -0
- data/lib/sqreen/frameworks/rails.rb +155 -0
- data/lib/sqreen/frameworks/rails3.rb +36 -0
- data/lib/sqreen/frameworks/sinatra.rb +34 -0
- data/lib/sqreen/frameworks/sqreen_test.rb +26 -0
- data/lib/sqreen/instrumentation.rb +504 -0
- data/lib/sqreen/log.rb +116 -0
- data/lib/sqreen/metrics.rb +6 -0
- data/lib/sqreen/metrics/average.rb +39 -0
- data/lib/sqreen/metrics/base.rb +41 -0
- data/lib/sqreen/metrics/collect.rb +22 -0
- data/lib/sqreen/metrics/sum.rb +20 -0
- data/lib/sqreen/metrics_store.rb +94 -0
- data/lib/sqreen/parsers/sql.rb +98 -0
- data/lib/sqreen/parsers/sql_tokenizer.rb +266 -0
- data/lib/sqreen/parsers/unix.rb +110 -0
- data/lib/sqreen/payload_creator.rb +132 -0
- data/lib/sqreen/performance_notifications.rb +86 -0
- data/lib/sqreen/performance_notifications/log.rb +36 -0
- data/lib/sqreen/performance_notifications/metrics.rb +36 -0
- data/lib/sqreen/performance_notifications/newrelic.rb +36 -0
- data/lib/sqreen/remote_command.rb +82 -0
- data/lib/sqreen/rule_attributes.rb +25 -0
- data/lib/sqreen/rule_callback.rb +97 -0
- data/lib/sqreen/rules.rb +116 -0
- data/lib/sqreen/rules_callbacks.rb +29 -0
- data/lib/sqreen/rules_callbacks/binding_accessor_metrics.rb +79 -0
- data/lib/sqreen/rules_callbacks/count_http_codes.rb +18 -0
- data/lib/sqreen/rules_callbacks/crawler_user_agent_matches.rb +24 -0
- data/lib/sqreen/rules_callbacks/crawler_user_agent_matches_metrics.rb +25 -0
- data/lib/sqreen/rules_callbacks/execjs.rb +136 -0
- data/lib/sqreen/rules_callbacks/headers_insert.rb +20 -0
- data/lib/sqreen/rules_callbacks/inspect_rule.rb +20 -0
- data/lib/sqreen/rules_callbacks/matcher_rule.rb +103 -0
- data/lib/sqreen/rules_callbacks/rails_parameters.rb +14 -0
- data/lib/sqreen/rules_callbacks/record_request_context.rb +23 -0
- data/lib/sqreen/rules_callbacks/reflected_xss.rb +40 -0
- data/lib/sqreen/rules_callbacks/regexp_rule.rb +36 -0
- data/lib/sqreen/rules_callbacks/shell.rb +33 -0
- data/lib/sqreen/rules_callbacks/shell_env.rb +32 -0
- data/lib/sqreen/rules_callbacks/sql.rb +41 -0
- data/lib/sqreen/rules_callbacks/system_shell.rb +25 -0
- data/lib/sqreen/rules_callbacks/url_matches.rb +25 -0
- data/lib/sqreen/rules_callbacks/user_agent_matches.rb +22 -0
- data/lib/sqreen/rules_signature.rb +142 -0
- data/lib/sqreen/runner.rb +312 -0
- data/lib/sqreen/runtime_infos.rb +127 -0
- data/lib/sqreen/session.rb +340 -0
- data/lib/sqreen/stats.rb +18 -0
- data/lib/sqreen/version.rb +6 -0
- metadata +143 -0
data/lib/sqreen/stats.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.io/terms.html
|
3
|
+
|
4
|
+
module Sqreen
|
5
|
+
@@stats = nil
|
6
|
+
|
7
|
+
def self::stats
|
8
|
+
@@stats ||= Stats.new
|
9
|
+
end
|
10
|
+
|
11
|
+
class Stats
|
12
|
+
attr_accessor :callbacks_calls
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
@callbacks_calls = 0
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sqreen
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.01461158029
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- Sqreen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: execjs
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.3.0
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.3.0
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: therubyrhino
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
prerelease: false
|
40
|
+
type: :runtime
|
41
|
+
description: Sqreen agent to protect Ruby applications
|
42
|
+
email: contact@sqreen.io
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- CODE_OF_CONDUCT.md
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- lib/sqreen.rb
|
51
|
+
- lib/sqreen/binding_accessor.rb
|
52
|
+
- lib/sqreen/ca.crt
|
53
|
+
- lib/sqreen/callback_tree.rb
|
54
|
+
- lib/sqreen/callbacks.rb
|
55
|
+
- lib/sqreen/capped_queue.rb
|
56
|
+
- lib/sqreen/condition_evaluator.rb
|
57
|
+
- lib/sqreen/conditionable.rb
|
58
|
+
- lib/sqreen/configuration.rb
|
59
|
+
- lib/sqreen/context.rb
|
60
|
+
- lib/sqreen/deliveries/batch.rb
|
61
|
+
- lib/sqreen/deliveries/simple.rb
|
62
|
+
- lib/sqreen/detect.rb
|
63
|
+
- lib/sqreen/detect/shell_injection.rb
|
64
|
+
- lib/sqreen/detect/sql_injection.rb
|
65
|
+
- lib/sqreen/event.rb
|
66
|
+
- lib/sqreen/events/attack.rb
|
67
|
+
- lib/sqreen/events/remote_exception.rb
|
68
|
+
- lib/sqreen/exception.rb
|
69
|
+
- lib/sqreen/frameworks.rb
|
70
|
+
- lib/sqreen/frameworks/generic.rb
|
71
|
+
- lib/sqreen/frameworks/rails.rb
|
72
|
+
- lib/sqreen/frameworks/rails3.rb
|
73
|
+
- lib/sqreen/frameworks/sinatra.rb
|
74
|
+
- lib/sqreen/frameworks/sqreen_test.rb
|
75
|
+
- lib/sqreen/instrumentation.rb
|
76
|
+
- lib/sqreen/log.rb
|
77
|
+
- lib/sqreen/metrics.rb
|
78
|
+
- lib/sqreen/metrics/average.rb
|
79
|
+
- lib/sqreen/metrics/base.rb
|
80
|
+
- lib/sqreen/metrics/collect.rb
|
81
|
+
- lib/sqreen/metrics/sum.rb
|
82
|
+
- lib/sqreen/metrics_store.rb
|
83
|
+
- lib/sqreen/parsers/sql.rb
|
84
|
+
- lib/sqreen/parsers/sql_tokenizer.rb
|
85
|
+
- lib/sqreen/parsers/unix.rb
|
86
|
+
- lib/sqreen/payload_creator.rb
|
87
|
+
- lib/sqreen/performance_notifications.rb
|
88
|
+
- lib/sqreen/performance_notifications/log.rb
|
89
|
+
- lib/sqreen/performance_notifications/metrics.rb
|
90
|
+
- lib/sqreen/performance_notifications/newrelic.rb
|
91
|
+
- lib/sqreen/remote_command.rb
|
92
|
+
- lib/sqreen/rule_attributes.rb
|
93
|
+
- lib/sqreen/rule_callback.rb
|
94
|
+
- lib/sqreen/rules.rb
|
95
|
+
- lib/sqreen/rules_callbacks.rb
|
96
|
+
- lib/sqreen/rules_callbacks/binding_accessor_metrics.rb
|
97
|
+
- lib/sqreen/rules_callbacks/count_http_codes.rb
|
98
|
+
- lib/sqreen/rules_callbacks/crawler_user_agent_matches.rb
|
99
|
+
- lib/sqreen/rules_callbacks/crawler_user_agent_matches_metrics.rb
|
100
|
+
- lib/sqreen/rules_callbacks/execjs.rb
|
101
|
+
- lib/sqreen/rules_callbacks/headers_insert.rb
|
102
|
+
- lib/sqreen/rules_callbacks/inspect_rule.rb
|
103
|
+
- lib/sqreen/rules_callbacks/matcher_rule.rb
|
104
|
+
- lib/sqreen/rules_callbacks/rails_parameters.rb
|
105
|
+
- lib/sqreen/rules_callbacks/record_request_context.rb
|
106
|
+
- lib/sqreen/rules_callbacks/reflected_xss.rb
|
107
|
+
- lib/sqreen/rules_callbacks/regexp_rule.rb
|
108
|
+
- lib/sqreen/rules_callbacks/shell.rb
|
109
|
+
- lib/sqreen/rules_callbacks/shell_env.rb
|
110
|
+
- lib/sqreen/rules_callbacks/sql.rb
|
111
|
+
- lib/sqreen/rules_callbacks/system_shell.rb
|
112
|
+
- lib/sqreen/rules_callbacks/url_matches.rb
|
113
|
+
- lib/sqreen/rules_callbacks/user_agent_matches.rb
|
114
|
+
- lib/sqreen/rules_signature.rb
|
115
|
+
- lib/sqreen/runner.rb
|
116
|
+
- lib/sqreen/runtime_infos.rb
|
117
|
+
- lib/sqreen/session.rb
|
118
|
+
- lib/sqreen/stats.rb
|
119
|
+
- lib/sqreen/version.rb
|
120
|
+
homepage: https://www.sqreen.io/
|
121
|
+
licenses: []
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.6.2
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Sqreen Ruby agent
|
143
|
+
test_files: []
|