caido 0.0.0.pre.dev → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +221 -0
- data/README.md +19 -15
- data/Rakefile +3 -3
- data/caido.gemspec +19 -13
- data/caido_introspection_schema.json +31049 -0
- data/lib/caido/helpers/_example.rb +10 -0
- data/lib/caido/helpers/automate.rb +30 -0
- data/lib/caido/helpers/export.rb +38 -0
- data/lib/caido/helpers/hosted_file.rb +19 -0
- data/lib/caido/helpers/replay.rb +89 -0
- data/lib/caido/helpers/request.rb +34 -0
- data/lib/caido/helpers/response.rb +19 -0
- data/lib/caido/helpers/runtime.rb +14 -0
- data/lib/caido/helpers/sitemap.rb +40 -0
- data/lib/caido/helpers/workflow.rb +36 -0
- data/lib/caido/helpers/workspace.rb +32 -0
- data/lib/caido/instance.rb +61 -0
- data/lib/caido/version.rb +1 -1
- data/lib/caido.rb +2 -2
- metadata +55 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cda2477d6d465b1196201a4f35af51e6b8529f5257de078f103fa5e91b9f213c
|
4
|
+
data.tar.gz: 1defe074a9e68c5dd032044247283d8299fefb6858d49def449ae9c8038700d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91393a417bdf2970789a2bcc050dc5f58897bbcf6e87d410000e935415e4742f47e9c5972572b98db486fdd2bda18297691a3bb795c909c49053f39e0a298f0e
|
7
|
+
data.tar.gz: 04ead47dc67153ec370bd30ebb1a0ac151858bbc3c8a7655032e381fecfae92a7d0bb7941544ebbfdd24851486db46fcca451b7410e55611fb715784c4e655be
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
11
|
+
|
12
|
+
AllCops:
|
13
|
+
TargetRubyVersion: 3.1
|
14
|
+
Metrics/MethodLength:
|
15
|
+
Max: 100
|
16
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
17
|
+
Enabled: true
|
18
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
19
|
+
Enabled: true
|
20
|
+
Gemspec/RequireMFA: # new in 1.23
|
21
|
+
Enabled: true
|
22
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
23
|
+
Enabled: true
|
24
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
25
|
+
Enabled: true
|
26
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
27
|
+
Enabled: true
|
28
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
29
|
+
Enabled: true
|
30
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
31
|
+
Enabled: true
|
32
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
33
|
+
Enabled: true
|
34
|
+
Lint/AmbiguousRange: # new in 1.19
|
35
|
+
Enabled: true
|
36
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
37
|
+
Enabled: true
|
38
|
+
Lint/DeprecatedConstants: # new in 1.8
|
39
|
+
Enabled: true
|
40
|
+
Lint/DuplicateBranch: # new in 1.3
|
41
|
+
Enabled: true
|
42
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
43
|
+
Enabled: true
|
44
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
45
|
+
Enabled: true
|
46
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
47
|
+
Enabled: true
|
48
|
+
Lint/EmptyBlock: # new in 1.1
|
49
|
+
Enabled: true
|
50
|
+
Lint/EmptyClass: # new in 1.3
|
51
|
+
Enabled: true
|
52
|
+
Lint/EmptyInPattern: # new in 1.16
|
53
|
+
Enabled: true
|
54
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
55
|
+
Enabled: true
|
56
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
57
|
+
Enabled: true
|
58
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
59
|
+
Enabled: true
|
60
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
61
|
+
Enabled: true
|
62
|
+
Lint/MixedCaseRange: # new in 1.53
|
63
|
+
Enabled: true
|
64
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
65
|
+
Enabled: true
|
66
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
67
|
+
Enabled: true
|
68
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
69
|
+
Enabled: true
|
70
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
71
|
+
Enabled: true
|
72
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
73
|
+
Enabled: true
|
74
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
75
|
+
Enabled: true
|
76
|
+
Lint/RefinementImportMethods: # new in 1.27
|
77
|
+
Enabled: true
|
78
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
79
|
+
Enabled: true
|
80
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
81
|
+
Enabled: true
|
82
|
+
Lint/SymbolConversion: # new in 1.9
|
83
|
+
Enabled: true
|
84
|
+
Lint/ToEnumArguments: # new in 1.1
|
85
|
+
Enabled: true
|
86
|
+
Lint/TripleQuotes: # new in 1.9
|
87
|
+
Enabled: true
|
88
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
89
|
+
Enabled: true
|
90
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
91
|
+
Enabled: true
|
92
|
+
Lint/UselessRescue: # new in 1.43
|
93
|
+
Enabled: true
|
94
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
95
|
+
Enabled: true
|
96
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
97
|
+
Enabled: true
|
98
|
+
Naming/BlockForwarding: # new in 1.24
|
99
|
+
Enabled: true
|
100
|
+
Security/CompoundHash: # new in 1.28
|
101
|
+
Enabled: true
|
102
|
+
Security/IoMethods: # new in 1.22
|
103
|
+
Enabled: true
|
104
|
+
Style/ArgumentsForwarding: # new in 1.1
|
105
|
+
Enabled: true
|
106
|
+
Style/ArrayIntersect: # new in 1.40
|
107
|
+
Enabled: true
|
108
|
+
Style/CollectionCompact: # new in 1.2
|
109
|
+
Enabled: true
|
110
|
+
Style/ComparableClamp: # new in 1.44
|
111
|
+
Enabled: true
|
112
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
113
|
+
Enabled: true
|
114
|
+
Style/DataInheritance: # new in 1.49
|
115
|
+
Enabled: true
|
116
|
+
Style/DirEmpty: # new in 1.48
|
117
|
+
Enabled: true
|
118
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
119
|
+
Enabled: true
|
120
|
+
Style/EmptyHeredoc: # new in 1.32
|
121
|
+
Enabled: true
|
122
|
+
Style/EndlessMethod: # new in 1.8
|
123
|
+
Enabled: true
|
124
|
+
Style/EnvHome: # new in 1.29
|
125
|
+
Enabled: true
|
126
|
+
Style/ExactRegexpMatch: # new in 1.51
|
127
|
+
Enabled: true
|
128
|
+
Style/FetchEnvVar: # new in 1.28
|
129
|
+
Enabled: true
|
130
|
+
Style/FileEmpty: # new in 1.48
|
131
|
+
Enabled: true
|
132
|
+
Style/FileRead: # new in 1.24
|
133
|
+
Enabled: true
|
134
|
+
Style/FileWrite: # new in 1.24
|
135
|
+
Enabled: true
|
136
|
+
Style/HashConversion: # new in 1.10
|
137
|
+
Enabled: true
|
138
|
+
Style/HashExcept: # new in 1.7
|
139
|
+
Enabled: true
|
140
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
141
|
+
Enabled: true
|
142
|
+
Style/InPatternThen: # new in 1.16
|
143
|
+
Enabled: true
|
144
|
+
Style/MagicCommentFormat: # new in 1.35
|
145
|
+
Enabled: true
|
146
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
147
|
+
Enabled: true
|
148
|
+
Style/MapIntoArray: # new in 1.63
|
149
|
+
Enabled: true
|
150
|
+
Style/MapToHash: # new in 1.24
|
151
|
+
Enabled: true
|
152
|
+
Style/MapToSet: # new in 1.42
|
153
|
+
Enabled: true
|
154
|
+
Style/MinMaxComparison: # new in 1.42
|
155
|
+
Enabled: true
|
156
|
+
Style/MultilineInPatternThen: # new in 1.16
|
157
|
+
Enabled: true
|
158
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
159
|
+
Enabled: true
|
160
|
+
Style/NestedFileDirname: # new in 1.26
|
161
|
+
Enabled: true
|
162
|
+
Style/NilLambda: # new in 1.3
|
163
|
+
Enabled: true
|
164
|
+
Style/NumberedParameters: # new in 1.22
|
165
|
+
Enabled: true
|
166
|
+
Style/NumberedParametersLimit: # new in 1.22
|
167
|
+
Enabled: true
|
168
|
+
Style/ObjectThen: # new in 1.28
|
169
|
+
Enabled: true
|
170
|
+
Style/OpenStructUse: # new in 1.23
|
171
|
+
Enabled: true
|
172
|
+
Style/OperatorMethodCall: # new in 1.37
|
173
|
+
Enabled: true
|
174
|
+
Style/QuotedSymbols: # new in 1.16
|
175
|
+
Enabled: true
|
176
|
+
Style/RedundantArgument: # new in 1.4
|
177
|
+
Enabled: true
|
178
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
179
|
+
Enabled: true
|
180
|
+
Style/RedundantConstantBase: # new in 1.40
|
181
|
+
Enabled: true
|
182
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
183
|
+
Enabled: true
|
184
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
185
|
+
Enabled: true
|
186
|
+
Style/RedundantEach: # new in 1.38
|
187
|
+
Enabled: true
|
188
|
+
Style/RedundantFilterChain: # new in 1.52
|
189
|
+
Enabled: true
|
190
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
191
|
+
Enabled: true
|
192
|
+
Style/RedundantInitialize: # new in 1.27
|
193
|
+
Enabled: true
|
194
|
+
Style/RedundantLineContinuation: # new in 1.49
|
195
|
+
Enabled: true
|
196
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
197
|
+
Enabled: true
|
198
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
199
|
+
Enabled: true
|
200
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
201
|
+
Enabled: true
|
202
|
+
Style/RedundantStringEscape: # new in 1.37
|
203
|
+
Enabled: true
|
204
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
205
|
+
Enabled: true
|
206
|
+
Style/SelectByRegexp: # new in 1.22
|
207
|
+
Enabled: true
|
208
|
+
Style/SendWithLiteralMethodName: # new in 1.64
|
209
|
+
Enabled: true
|
210
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
211
|
+
Enabled: true
|
212
|
+
Style/StringChars: # new in 1.12
|
213
|
+
Enabled: true
|
214
|
+
Style/SuperArguments: # new in 1.64
|
215
|
+
Enabled: true
|
216
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
217
|
+
Enabled: true
|
218
|
+
Style/SwapValues: # new in 1.1
|
219
|
+
Enabled: true
|
220
|
+
Style/YAMLFileRead: # new in 1.53
|
221
|
+
Enabled: true
|
data/README.md
CHANGED
@@ -1,31 +1,35 @@
|
|
1
|
-
# Caido
|
2
1
|
|
3
|
-
|
2
|
+
<img alt="caido-ruby" src="https://github.com/caineers/caido-ruby/assets/13212227/b58b2d5e-890c-49c2-a5f5-06168267beae" width="450px;">
|
4
3
|
|
5
|
-
|
4
|
+
## Introduction
|
6
5
|
|
7
|
-
|
6
|
+
[Caido](https://caido.io) is a lightweight web security auditing toolkit designed to assist developers and security professionals in identifying vulnerabilities within web applications. The `caido-ruby` library serves as a Ruby implementation of Caido's API, providing a seamless and efficient way for Ruby developers to integrate Caido's powerful security auditing capabilities into their applications.
|
8
7
|
|
9
|
-
|
8
|
+
## Installation
|
10
9
|
|
11
|
-
|
10
|
+
```bash
|
11
|
+
gem install caido
|
12
|
+
```
|
12
13
|
|
13
|
-
|
14
|
+
## Usage
|
14
15
|
|
15
|
-
|
16
|
+
```ruby
|
17
|
+
require 'caido'
|
16
18
|
|
17
|
-
|
19
|
+
instance = Caido::Instance.new "http://localhost:8080", "AUTH_TOKEN"
|
18
20
|
|
19
|
-
|
21
|
+
# Use helper
|
22
|
+
instance.version # 0.38.0
|
23
|
+
instance.projects # [...]
|
24
|
+
instance.replay_sessions # [{"name"=>"1", "activeEntry"=> {"request"=> ... ]
|
25
|
+
instance.request(12) # {"id"=>"12", "host"=>"www.hahwul.com", "method"=>"GET", ... }
|
20
26
|
|
21
|
-
|
27
|
+
# Use GraphQL Query
|
28
|
+
instance.query('{runtime{platform}}')
|
29
|
+
```
|
22
30
|
|
23
31
|
## Development
|
24
32
|
|
25
33
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
34
|
|
27
35
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
-
|
29
|
-
## Contributing
|
30
|
-
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/caido.
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
5
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
|
8
|
-
require
|
8
|
+
require 'rubocop/rake_task'
|
9
9
|
|
10
10
|
RuboCop::RakeTask.new
|
11
11
|
|
data/caido.gemspec
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative 'lib/caido/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
6
|
+
spec.name = 'caido'
|
7
7
|
spec.version = Caido::VERSION
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
8
|
+
spec.authors = ['HAHWUL']
|
9
|
+
spec.email = ['hahwul@gmail.com']
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
|
14
|
-
spec.
|
11
|
+
spec.summary = 'The caido-ruby library simplifies using Caido\'s API in Ruby applications.'
|
12
|
+
spec.description = 'The caido-ruby library simplifies using Caido\'s API in Ruby applications.
|
13
|
+
Caido is lightweight web security auditing toolkit.'
|
14
|
+
spec.homepage = 'https://rubygems.org/gems/caido'
|
15
|
+
spec.required_ruby_version = '>= 3.1.0'
|
15
16
|
|
16
|
-
|
17
|
-
spec.
|
17
|
+
# SPDX license identifier for the MIT license
|
18
|
+
spec.license = 'MIT'
|
19
|
+
|
20
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
21
|
+
spec.metadata['source_code_uri'] = 'https://github.com/caineers/caido-ruby'
|
18
22
|
|
19
23
|
# Specify which files should be added to the gem when it is released.
|
20
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -24,13 +28,15 @@ Gem::Specification.new do |spec|
|
|
24
28
|
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
|
25
29
|
end
|
26
30
|
end
|
27
|
-
spec.bindir =
|
31
|
+
spec.bindir = 'exe'
|
28
32
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
|
-
spec.require_paths = [
|
33
|
+
spec.require_paths = ['lib']
|
30
34
|
|
31
35
|
# Uncomment to register a new dependency of your gem
|
32
|
-
|
36
|
+
spec.add_dependency 'graphql', '~> 2.3.0'
|
37
|
+
spec.add_dependency 'httparty', '~> 0.22.0'
|
33
38
|
|
34
39
|
# For more information and examples about making a new gem, check out our
|
35
40
|
# guide at: https://bundler.io/guides/creating_gem.html
|
41
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
36
42
|
end
|