caido 0.0.0.pre.dev → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 304d66b89fd9f205a4924019fe5d84d4a89e067cb7d08397bf4118b2f4dffd55
4
- data.tar.gz: d2603a2ca1bc0b67c3b07844504b74e807435a24a1587b809e3dc3a5ceebb6c1
3
+ metadata.gz: 4c43085683b6d97f057140647f6f6aa959a17f5f88ec0f2dbe52d7e027197214
4
+ data.tar.gz: 57fb094a2647d2299f29638658b2e4015028d742f6c8ac505553b5e3582fffe9
5
5
  SHA512:
6
- metadata.gz: 0f6acce49f158bb356e107620533854d1f377c52adc5c64174d4a9e61ba55932ba75db811509ac50687d7ef1c35376e668931545a44744fb17961609b96b8960
7
- data.tar.gz: f7c76d77ad2ec9ff0e3bb14e118c07890a6ce8ef68077e91ae965aa39f19e895f77989edd388edee14610f4dead5f4b7b750c21efc4e8824d0ddcff73851b03d
6
+ metadata.gz: ffb1bcd6ec848c490052e8d0e3e224e58568989a56799b036a125c9b14a3f169d4055630995963e6e3459df0c8f3bf848a1c20a54b299f5ee65d8cd9007bef93
7
+ data.tar.gz: c6d8af7ce810d0b1d8ae4df8ab69f27f0b8d911715a9d4d8155d79b5aea826f7d4105ef4fa2a30be9eeecab5ebdaefe8e83c7ec6d6a749e3c954c438b4b235b1
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,33 @@
1
- # Caido
2
1
 
3
- TODO: Delete this and the text below, and describe your gem
2
+ <img alt="caido-ruby" src="https://github.com/caineers/caido-ruby/assets/13212227/b58b2d5e-890c-49c2-a5f5-06168267beae" width="450px;">
4
3
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/caido`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+ ## Introduction
6
5
 
7
- ## Installation
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
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
8
+ ## Installation
10
9
 
11
- Install the gem and add to the application's Gemfile by executing:
10
+ ```bash
11
+ gem install caido
12
+ ```
12
13
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+ ## Usage
14
15
 
15
- If bundler is not being used to manage dependencies, install the gem by executing:
16
+ ```ruby
17
+ require 'caido'
16
18
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
19
+ instance = Caido::Instance.new "http://localhost:8080", "AUTH_TOKEN"
18
20
 
19
- ## Usage
21
+ # Use helper
22
+ instance.version # 0.38.0
23
+ instance.projects # [...]
20
24
 
21
- TODO: Write usage instructions here
25
+ # Use GraphQL Query
26
+ instance.query('{runtime{platform}}')
27
+ ```
22
28
 
23
29
  ## Development
24
30
 
25
31
  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
32
 
27
33
  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 "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- require "rubocop/rake_task"
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 "lib/caido/version"
3
+ require_relative 'lib/caido/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "caido"
6
+ spec.name = 'caido'
7
7
  spec.version = Caido::VERSION
8
- spec.authors = ["HAHWUL"]
9
- spec.email = ["hahwul@gmail.com"]
8
+ spec.authors = ['HAHWUL']
9
+ spec.email = ['hahwul@gmail.com']
10
10
 
11
- spec.summary = "Ruby implementation of Caido"
12
- spec.description = "Tuby implementation of Caido"
13
- spec.homepage = "https://github.com/caineers/caido-ruby"
14
- spec.required_ruby_version = ">= 2.6.0"
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
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/caineers/caido-ruby"
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 = "exe"
31
+ spec.bindir = 'exe'
28
32
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
33
+ spec.require_paths = ['lib']
30
34
 
31
35
  # Uncomment to register a new dependency of your gem
32
- # spec.add_dependency "example-gem", "~> 1.0"
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