Skip to content

Commit

Permalink
Modification: Modified to generate PASS if no secrets (#621)
Browse files Browse the repository at this point in the history
* Added AWS 'Secrets Manager Secret Rotation Enabled' plugin and test cases

* Modified to generate PASS if no secrets

Co-authored-by: Gio Rodriguez <gioroddev@gmail.com>
  • Loading branch information
AkhtarAmir and giorod3 authored Mar 29, 2021
1 parent 956bf2e commit 64986c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/aws/secretsmanager/secretRotationEnabled.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
}

if (!listSecrets.data.length) {
helpers.addResult(results, 2, 'Secrets Manager is not in use', region);
helpers.addResult(results, 0, 'No secrets found', region);
return rcb();
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/aws/secretsmanager/secretRotationEnabled.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ describe('secretRotationEnabled', function () {
});
});

it('should PASS if Secrets Manager is not in use', function (done) {
it('should PASS if no secrets found', function (done) {
const cache = createCache([]);
secretRotationEnabled.run(cache, {}, (err, results) => {
expect(results.length).to.equal(1);
expect(results[0].status).to.equal(2);
expect(results[0].status).to.equal(0);
expect(results[0].region).to.equal('us-east-1');
done();
});
Expand Down

0 comments on commit 64986c6

Please sign in to comment.