cyberark / secrets-provider-for-k8s

Cyberark secrets provider for k8s
Apache License 2.0
26 stars 11 forks source link

Null out local variables containing secrets after use #514

Closed gl-johnson closed 1 year ago

gl-johnson commented 1 year ago

Desired Outcome

In security review, we discussed making sure that local variables containing secret values are nulled out to make sure they are no longer in memory after being used.

Implemented Changes

Explicitly null out local variables which could contain secret values. After some research, this is more reliable and secure with byte slices than strings since Golang treats strings as immutable and may be left hanging around in memory, so switch to using slices where possible

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

Test coverage

Documentation

Behavior

Security

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit aac4d1ea and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 88.2% (0.0% change).

View more on Code Climate.