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 <asara.ratnakar@gmail.com>
  • Loading branch information
asararatnakar authored Mar 11, 2024
1 parent 5089f42 commit e314f75
Show file tree
Hide file tree
Showing 6 changed files with 13 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
3 changes: 3 additions & 0 deletions definitions/peer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 7051
runAsNonRoot: true
runAsUser: 7051
volumeMounts:
Expand Down Expand Up @@ -225,6 +226,7 @@ spec:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
Expand Down Expand Up @@ -269,5 +271,6 @@ spec:
subPath: data
securityContext:
fsGroup: 2000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000

0 comments on commit e314f75

Please sign in to comment.