Skip to content

Commit

Permalink
Package comments and explanation why we use non-secure algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbespalov committed Dec 7, 2023
1 parent 6aa2e14 commit 1678c70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 5 additions & 4 deletions js/modules/k6/crypto/crypto.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Package crypto provides common hashing function for the k6
package crypto

import (
"crypto/hmac"
"crypto/md5"
"crypto/md5" // #nosec G501 // MD5 is weak, but we need it for compatibility
"crypto/rand"
"crypto/sha1"
"crypto/sha1" // #nosec G505 // SHA1 is weak, but we need it for compatibility
"crypto/sha256"
"crypto/sha512"
"encoding/base64"
Expand All @@ -13,8 +14,8 @@ import (
"fmt"
"hash"

"golang.org/x/crypto/md4"
"golang.org/x/crypto/ripemd160"
"golang.org/x/crypto/md4" //nolint:staticcheck // #nosec G501 // MD4 is weak, but we need it for compatibility
"golang.org/x/crypto/ripemd160" // no lint:staticcheck // #nosec G501 // RIPEMD160 is weak, but we need it for compatibility

"github.com/dop251/goja"

Expand Down
3 changes: 2 additions & 1 deletion js/modules/k6/crypto/x509/x509.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Package x509 provides X.509 certificate parsing for the k6
package x509

import (
"crypto/dsa"
"crypto/dsa" //nolint:staticcheck // #nosec G505 // DSA is weak, but we need it for compatibility
"crypto/ecdsa"
"crypto/rsa"
"crypto/sha1" // #nosec G505
Expand Down
1 change: 1 addition & 0 deletions js/modules/k6/encoding/encoding.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package encoding provides encoding/decoding functionality for the k6
package encoding

import (
Expand Down

0 comments on commit 1678c70

Please sign in to comment.