Skip to content

Commit 01f2946

Browse files
mirskifapranav.goyal
authored andcommitted
Update gosec to support package changes in new Go versions
1 parent a799faf commit 01f2946

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/sensitive/sensitive.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (s *Sensitive) Clear() {
7474
//
7575
// NOTE: if the Sensitive object is garbage collected, or Clear() is called, this string will be zeroed even if it remains in scope
7676
func (s *Sensitive) String() string {
77+
// #nosec G103 - unsafe package is required in order to prevent memory copy during type conversion to string
7778
return unsafe.String(unsafe.SliceData(s.meta.buf), len(s.buf))
7879
}
7980

0 commit comments

Comments
 (0)