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

Commit e3bff3f

Browse files
committed
csv: fix values for policy and acl fields being the opposite of what the heading suggested
1 parent 3dff1d3 commit e3bff3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/formatters/csv.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class Csv implements S3Audit.Types.Formatter {
128128
return new Promise(resolve => {
129129
bucket.getPolicyWildcardEntities()
130130
.then((entities: Array<string>) => {
131-
bucketDetails.bucket_policy = entities.length > 0
131+
bucketDetails.bucket_policy = entities.length === 0
132132
})
133133
.catch((error: AWSError) => {
134134
bucketDetails.bucket_policy = error.message
@@ -140,8 +140,8 @@ export default class Csv implements S3Audit.Types.Formatter {
140140
private populateACLField(bucket: Bucket, bucketDetails: S3Audit.Types.CSVFields) {
141141
return new Promise(resolve => {
142142
bucket.allowsPublicAccessViaACL()
143-
.then((isAllowed: boolean) => {
144-
bucketDetails.bucket_acl = isAllowed
143+
.then((isPublic: boolean) => {
144+
bucketDetails.bucket_acl = isPublic === false
145145
})
146146
.catch((error: AWSError) => {
147147
bucketDetails.bucket_acl = error.message

0 commit comments

Comments
 (0)