scan_gem 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/scan/version.rb +3 -0
- data/lib/scan.rb +24 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 462bf7b74373e4d2942284363b54a3010e01ac38d8fb1fa062f8ae006619ec25
|
4
|
+
data.tar.gz: e69a0b51a37c15dcbec21c0a06b0ba36595ad11730b441ff4ab10f888a169389
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fcaea83ffec252bf3179fe92690db6bbdfa3be31f8fc08a1172603f7c7efebd96900f1e400da080e107cc0974c65e24530bacd10217b9dd2b7392a94e73c8828
|
7
|
+
data.tar.gz: 86d0d8db7a35bb3fb1f2a30d95e80c4bbeaa63b1848ca8525dd182fe3a5ce427b52b58bbd880e3b1d18a3f5568967cafd62c3615c9444093b1154538e9e22911
|
data/lib/scan/version.rb
ADDED
data/lib/scan.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require "scan/version"
|
2
|
+
|
3
|
+
module Scan
|
4
|
+
class Error < StandardError; end
|
5
|
+
# frozen_string_literal: true
|
6
|
+
require "spec_helper"
|
7
|
+
|
8
|
+
feature "improper password hashing" do
|
9
|
+
let(:normal_user) { UserFixture.normal_user }
|
10
|
+
|
11
|
+
before do
|
12
|
+
UserFixture.reset_all_users
|
13
|
+
pending unless verifying_fixed?
|
14
|
+
end
|
15
|
+
|
16
|
+
scenario "with just md5\nTutorial: https://github.com/OWASP/railsgoat/wiki/A6-Sensitive-Data-Exposure-Insecure-Password-Storage" do
|
17
|
+
new_pass = "testPassw0rd!"
|
18
|
+
normal_user.password = new_pass
|
19
|
+
normal_user.password_confirmation = new_pass
|
20
|
+
normal_user.save!
|
21
|
+
|
22
|
+
expect(normal_user.password).not_to eq(Digest::MD5.hexdigest(new_pass))
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scan_gem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- avishek
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-07-28 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: This gem is vulnerable code.
|
14
|
+
email:
|
15
|
+
- your.email@example.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/scan.rb
|
21
|
+
- lib/scan/version.rb
|
22
|
+
homepage: http://example.com/hello_world_gem
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubygems_version: 3.1.2
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: A simple vulnerable code gem
|
45
|
+
test_files: []
|