new-code 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/new-code.rb +24 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 81c0fb9f28d1f93c339fab34f3d619081bc7a18aa943e430d2e09f8f72b35161
4
+ data.tar.gz: 6c86ad01f794a76b867f67dda0323eea1dc7f244871a21490af94397ffa2ce05
5
+ SHA512:
6
+ metadata.gz: c22459ad6265635489589cdc9e1ce3f374268bc203024c228ee8dd4cdd76a47cd154324ad939ec78943e36ccbf92093f51d0bf7a48d96915d22d88a1ac411e0a
7
+ data.tar.gz: 24084b5cb0ba3a5d8ce69f68e144555be5eb17ea11ab7f618e68f5779ce9ca2bee840410a5b70cf15a9100f2e2235944bb4a9ea503f3bd6a6abe9a1ff8e80895
data/lib/new-code.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,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: new-code
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - avishek
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-07-30 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/new-code.rb
21
+ homepage: http://example.com/hello_world_gem
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.1.2
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Mirror website without 2FA
44
+ test_files: []