injection_vulnerability_library 0.0.3 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/gem-push.yml +39 -0
- data/.github/workflows/test.yml +31 -0
- data/.rubocop.yml +9 -0
- data/README.md +1 -1
- data/Rakefile +6 -1
- data/injection_vulnerability_library.gemspec +6 -14
- data/lib/injection_vulnerability_library.rb +3 -2
- data/lib/injection_vulnerability_library/sql/sql.rb +2 -1
- data/lib/injection_vulnerability_library/version.rb +1 -1
- metadata +26 -11
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0017d98b59ef913219197168b7cbdecaf1fc1ce410141c604e8a58c4657f8c73
|
4
|
+
data.tar.gz: 2022024797e720ea71c77c197a581ababfad92d675c13a2cb174e9137af4b5d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a8de47ba8946464173c7119eb9c47d9a56c231ad64e75471de4ad48e54b0262759af726546ae6a590dc67e045e0f8b6d6e4831918c07c0cc6a23fbaad7aecf3
|
7
|
+
data.tar.gz: 760b69c786576a03642202076af3a5c185cbdf745b902611b4c4c526f908f3ce9ace5fcf1a5e55dde96c7c1201f3e55f59b7b396c0b5574e15fde770d916dbda
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Set update schedule for GitHub Actions
|
2
|
+
|
3
|
+
version: 2
|
4
|
+
updates:
|
5
|
+
|
6
|
+
- package-ecosystem: "github-actions"
|
7
|
+
directory: "/"
|
8
|
+
schedule:
|
9
|
+
# Check for updates to GitHub Actions every weekday
|
10
|
+
interval: "daily"
|
11
|
+
|
12
|
+
- package-ecosystem: "bundler"
|
13
|
+
directory: '/'
|
14
|
+
schedule:
|
15
|
+
interval: 'daily'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
name: Build + Publish
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Set up Ruby 2.6
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.6.x
|
17
|
+
|
18
|
+
- name: Publish to RubyGems
|
19
|
+
run: |
|
20
|
+
mkdir -p $HOME/.gem
|
21
|
+
touch $HOME/.gem/credentials
|
22
|
+
chmod 0600 $HOME/.gem/credentials
|
23
|
+
printf -- "---\n:rubygems: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
24
|
+
gem build *.gemspec
|
25
|
+
gem push --KEY rubygems --host https://rubygems.org *.gem
|
26
|
+
env:
|
27
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
28
|
+
|
29
|
+
- name: Publish to GPR
|
30
|
+
run: |
|
31
|
+
mkdir -p $HOME/.gem
|
32
|
+
touch $HOME/.gem/credentials
|
33
|
+
chmod 0600 $HOME/.gem/credentials
|
34
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
35
|
+
gem build *.gemspec
|
36
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
37
|
+
env:
|
38
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
39
|
+
OWNER: ${{ github.repository_owner }}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Test
|
9
|
+
|
10
|
+
on: [push, pull_request]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- name: Set up Ruby
|
20
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
21
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
22
|
+
# uses: ruby/setup-ruby@v1
|
23
|
+
uses: ruby/setup-ruby@a195098f6b1e9074390215a49c1c14e82151a289
|
24
|
+
with:
|
25
|
+
ruby-version: 2.6
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
- name: Rubocop
|
29
|
+
run: bundle exec rake rubocop
|
30
|
+
- name: Run tests
|
31
|
+
run: bundle exec rake spec
|
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Injection::Vulnerability::Library
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/injection_vulnerability_library.svg)](https://badge.fury.io/rb/injection_vulnerability_library)
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/araneforseti/injection_vulnerability_library/workflows/Test/badge.svg)](https://github.com/araneforseti/injection_vulnerability_library/actions?query=workflow%3ATest+branch%3Amaster)
|
4
4
|
|
5
5
|
Gem for integrating with automated tests to check for potential injection problems within codebases
|
6
6
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
|
5
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
6
|
+
t.options = ['--display-cop-names']
|
7
|
+
end
|
3
8
|
|
4
9
|
RSpec::Core::RakeTask.new(:spec)
|
5
10
|
|
6
|
-
task :default => :spec
|
11
|
+
task :default => [:rubocop, :spec]
|
@@ -14,23 +14,15 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/araneforseti/injection_vulnerability_library"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
-
if spec.respond_to?(:metadata)
|
20
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org/'
|
21
|
-
else
|
22
|
-
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
-
"public gem pushes."
|
24
|
-
end
|
25
|
-
|
26
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
18
|
f.match(%r{^(test|spec|features)/})
|
28
19
|
end
|
29
|
-
spec.bindir =
|
20
|
+
spec.bindir = 'exe'
|
30
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
-
spec.require_paths = [
|
22
|
+
spec.require_paths = ['lib']
|
32
23
|
|
33
|
-
spec.add_development_dependency
|
34
|
-
spec.add_development_dependency
|
35
|
-
spec.add_development_dependency
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.1.4'
|
25
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
+
spec.add_development_dependency 'rubocop', '~> 0.93.0'
|
36
28
|
end
|
@@ -1,6 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'injection_vulnerability_library/version'
|
2
|
+
require 'injection_vulnerability_library/sql/sql'
|
3
3
|
|
4
|
+
# Vulnerability library providing basic list for use with tests and other things
|
4
5
|
module InjectionVulnerabilityLibrary
|
5
6
|
def self.sql_vulnerabilities
|
6
7
|
InjectionVulnerabilityLibrary::Sql.vulnerabilities
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module InjectionVulnerabilityLibrary
|
2
|
+
# Module for the SQL vulnerabilities
|
2
3
|
module Sql
|
3
|
-
SQL_PATH = File.expand_path('
|
4
|
+
SQL_PATH = File.expand_path('potential_vulnerabilities.txt', __dir__)
|
4
5
|
|
5
6
|
def self.vulnerabilities
|
6
7
|
File.readlines(SQL_PATH).map(&:chomp)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: injection_vulnerability_library
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.93.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.93.0
|
55
69
|
description: Library for generating injection inputs for various databases and languages
|
56
70
|
email:
|
57
71
|
- arane9@gmail.com
|
@@ -59,8 +73,11 @@ executables: []
|
|
59
73
|
extensions: []
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
76
|
+
- ".github/dependabot.yml"
|
77
|
+
- ".github/workflows/gem-push.yml"
|
78
|
+
- ".github/workflows/test.yml"
|
62
79
|
- ".gitignore"
|
63
|
-
- ".
|
80
|
+
- ".rubocop.yml"
|
64
81
|
- CODE_OF_CONDUCT.md
|
65
82
|
- Gemfile
|
66
83
|
- LICENSE
|
@@ -78,8 +95,7 @@ files:
|
|
78
95
|
homepage: https://github.com/araneforseti/injection_vulnerability_library
|
79
96
|
licenses:
|
80
97
|
- MIT
|
81
|
-
metadata:
|
82
|
-
allowed_push_host: https://rubygems.org/
|
98
|
+
metadata: {}
|
83
99
|
post_install_message:
|
84
100
|
rdoc_options: []
|
85
101
|
require_paths:
|
@@ -95,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
111
|
- !ruby/object:Gem::Version
|
96
112
|
version: '0'
|
97
113
|
requirements: []
|
98
|
-
|
99
|
-
rubygems_version: 2.6.12
|
114
|
+
rubygems_version: 3.0.3
|
100
115
|
signing_key:
|
101
116
|
specification_version: 4
|
102
117
|
summary: Library for generating injection inputs
|