Skip to content

Commit

Permalink
Fix Insecure File Permissions (#175)
Browse files Browse the repository at this point in the history
Changes to disable read and write permissions to the group user

Signed-off-by: asararatnakar <[email protected]>
Signed-off-by: Shoaeb Jindani <[email protected]>
  • Loading branch information
asararatnakar authored and Shoaeb Jindani committed Mar 21, 2024
1 parent febed7f commit 6ebcc7e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions definitions/ca/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 7051
runAsNonRoot: true
runAsUser: 7051
volumeMounts:
Expand Down Expand Up @@ -130,6 +131,7 @@ spec:
runAsUser: 0
securityContext:
fsGroup: 7051
runAsGroup: 7051
runAsNonRoot: true
runAsUser: 7051
serviceAccountName: sample
Expand Down
3 changes: 3 additions & 0 deletions definitions/console/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
Expand Down Expand Up @@ -117,6 +118,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
Expand Down Expand Up @@ -199,6 +201,7 @@ spec:
runAsUser: 0
securityContext:
fsGroup: 2000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
serviceAccountName: sample
3 changes: 3 additions & 0 deletions definitions/orderer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 7051
runAsNonRoot: true
runAsUser: 7051
startupProbe:
Expand Down Expand Up @@ -171,6 +172,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
Expand Down Expand Up @@ -221,6 +223,7 @@ spec:
subPath: data
securityContext:
fsGroup: 2000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
serviceAccountName: sample
1 change: 1 addition & 0 deletions definitions/peer/chaincode-launcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ imagePullPolicy: Always
securityContext:
privileged: false
readOnlyRootFileSystem: false
runAsGroup: 7051
runAsNonRoot: true
runAsUser: 7051
capabilities:
Expand Down
1 change: 1 addition & 0 deletions definitions/peer/couchdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ imagePullPolicy: Always
securityContext:
privileged: false
readOnlyRootFileSystem: false
runAsGroup: 5984
runAsNonRoot: true
runAsUser: 5984
capabilities:
Expand Down

0 comments on commit 6ebcc7e

Please sign in to comment.