-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3006 from returntocorp/merge-develop-to-release
Merge Develop into Release
- Loading branch information
Showing
18 changed files
with
99 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
|
||
FROM busybox | ||
ENTRYPOINT /bin/true | ||
RUN echo hello | ||
# ruleid: multiple-entrypoint-instructions | ||
ENTRYPOINT /bin/false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,64 @@ | ||
module Test | ||
|
||
require 'openssl' | ||
|
||
class Test | ||
$pass = 'super secret' | ||
|
||
def initialize(key = nil, iv = nil) | ||
@pass1 = 'my secure pass phrase goes here' | ||
@keypem = 'foo.pem' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
OpenSSL::PKey::RSA.new(1024).to_pem(cipher, "secret") | ||
bad | ||
bad1 | ||
bad2 | ||
bad3 | ||
ok | ||
end | ||
|
||
|
||
def bad | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, $pass | ||
end | ||
|
||
def bad1 | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, @pass1 | ||
$bad0 = 'secret' | ||
end | ||
|
||
def bad2 | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, 'secret' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, $bad0 | ||
end | ||
|
||
def bad3 | ||
ca_key = OpenSSL::PKey::RSA.new 2048 | ||
pass_phrase = 'my secure pass phrase goes here' | ||
cipher = OpenSSL::Cipher.new 'AES-256-CBC' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
ca_key.export(cipher, pass_phrase) | ||
open 'tmp/ca_key.pem', 'w', 0644 do |io| | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, pass_phrase) | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, $pass) | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, @pass1) | ||
end | ||
end | ||
|
||
def ok | ||
key_pem = File.read @keypem | ||
#ok: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, ENV['SECRET'] | ||
end | ||
end | ||
require 'openssl' | ||
|
||
class Test | ||
$pass = 'super secret' | ||
|
||
def initialize(key = nil, iv = nil) | ||
@pass1 = 'my secure pass phrase goes here' | ||
@keypem = 'foo.pem' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
OpenSSL::PKey::RSA.new(1024).to_pem(cipher, "secret") | ||
bad | ||
bad1 | ||
bad2 | ||
bad3 | ||
ok | ||
end | ||
|
||
|
||
def bad | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, $pass | ||
end | ||
|
||
def bad1 | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, @pass1 | ||
$bad0 = 'secret' | ||
end | ||
|
||
def bad2 | ||
key_pem = File.read @keypem | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, 'secret' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, $bad0 | ||
end | ||
|
||
def bad3 | ||
ca_key = OpenSSL::PKey::RSA.new 2048 | ||
pass_phrase = 'my secure pass phrase goes here' | ||
cipher = OpenSSL::Cipher.new 'AES-256-CBC' | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
ca_key.export(cipher, pass_phrase) | ||
open 'tmp/ca_key.pem', 'w', 0644 do |io| | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, pass_phrase) | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, $pass) | ||
#ruleid: hardcoded-secret-rsa-passphrase | ||
io.write ca_key.export(cipher, @pass1) | ||
end | ||
end | ||
|
||
def ok | ||
key_pem = File.read @keypem | ||
#ok: hardcoded-secret-rsa-passphrase | ||
key = OpenSSL::PKey::RSA.new key_pem, ENV['SECRET'] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use std::env; | ||
|
||
// ruleid: args-os | ||
let args = env::args_os() | ||
let args = env::args_os(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use std::env; | ||
|
||
// ruleid: args | ||
let args = env::args() | ||
let args = env::args(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use std::env; | ||
|
||
// ruleid: current-exe | ||
let exe = env::current_exe() | ||
let exe = env::current_exe(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use std::env; | ||
|
||
// ruleid: temp-dir | ||
let dir = env::temp_dir() | ||
let dir = env::temp_dir(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters