Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
csv: fix values for policy and acl fields being the opposite of what …
Browse files Browse the repository at this point in the history
…the heading suggested
  • Loading branch information
robbytaylor committed Oct 4, 2019
1 parent 3dff1d3 commit e3bff3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/formatters/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class Csv implements S3Audit.Types.Formatter {
return new Promise(resolve => {
bucket.getPolicyWildcardEntities()
.then((entities: Array<string>) => {
bucketDetails.bucket_policy = entities.length > 0
bucketDetails.bucket_policy = entities.length === 0
})
.catch((error: AWSError) => {
bucketDetails.bucket_policy = error.message
Expand All @@ -140,8 +140,8 @@ export default class Csv implements S3Audit.Types.Formatter {
private populateACLField(bucket: Bucket, bucketDetails: S3Audit.Types.CSVFields) {
return new Promise(resolve => {
bucket.allowsPublicAccessViaACL()
.then((isAllowed: boolean) => {
bucketDetails.bucket_acl = isAllowed
.then((isPublic: boolean) => {
bucketDetails.bucket_acl = isPublic === false
})
.catch((error: AWSError) => {
bucketDetails.bucket_acl = error.message
Expand Down

0 comments on commit e3bff3f

Please sign in to comment.