Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a docker file and add k8s deployments manifest file #212

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9ad1800
Delete kustomize directory
priyadarshi0811 Sep 4, 2024
63c72da
Delete DevSecOps directory
priyadarshi0811 Sep 4, 2024
303a1d0
Delete docker-compose.yaml
priyadarshi0811 Sep 4, 2024
b8a9cf8
Delete sonar-project.properties
priyadarshi0811 Sep 4, 2024
1c47b25
Delete terraform directory
priyadarshi0811 Sep 4, 2024
11f4f48
Update replica-sets.yml
priyadarshi0811 Sep 4, 2024
664b8bd
Update pod.yml
priyadarshi0811 Sep 4, 2024
aeb6c07
Update deployment.yml
priyadarshi0811 Sep 4, 2024
340d9a4
Update deployment.yml
priyadarshi0811 Sep 4, 2024
4bf1d75
Update pod.yml
priyadarshi0811 Sep 4, 2024
265e791
Update replica-sets.yml
priyadarshi0811 Sep 4, 2024
7fdfc6e
Update deployment.yml
priyadarshi0811 Sep 4, 2024
86c64f7
Update deployment.yml
priyadarshi0811 Sep 4, 2024
87897e9
Update pod.yml
priyadarshi0811 Sep 4, 2024
e44dd0d
Update replica-sets.yml
priyadarshi0811 Sep 4, 2024
7fa7d23
Update service.yml
priyadarshi0811 Sep 4, 2024
9a8b5fa
Update todo.ejs
priyadarshi0811 Sep 4, 2024
0193650
Update Jenkinsfile
priyadarshi0811 Sep 19, 2024
4a2ef8f
Update Dockerfile
priyadarshi0811 Sep 19, 2024
3413da2
Update Dockerfile
priyadarshi0811 Sep 19, 2024
0bb2cbf
Delete Dockerfile
priyadarshi0811 Sep 19, 2024
6f8fedc
Create Dockerfile
priyadarshi0811 Sep 19, 2024
eeaa751
Update Dockerfile
priyadarshi0811 Oct 9, 2024
d19db98
Update Dockerfile
priyadarshi0811 Oct 9, 2024
d9d2cb6
Delete k8s directory
priyadarshi0811 Oct 9, 2024
38f287a
Delete Dockerfile
priyadarshi0811 Oct 9, 2024
e54cfde
Delete Jenkinsfile
priyadarshi0811 Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions DevSecOps/Jenkinsfile

This file was deleted.

152 changes: 0 additions & 152 deletions DevSecOps/README.md

This file was deleted.

1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ pipeline {
}
}
}

7 changes: 0 additions & 7 deletions docker-compose.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions k8s/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: node-app-deployment
namespace: node-app
namespace: node155
labels:
app: node-app
spec:
Expand All @@ -13,13 +13,13 @@ spec:
template:
metadata:
name: node-pod
namespace: node-app
namespace: node155
labels:
app: node-app
spec:
containers:
- name: node-container
image: trainwithshubham/node-app-batch-6
image: darshif5/simple-node-app:node-todo
ports:
- containerPort: 8000
resources:
Expand Down
4 changes: 2 additions & 2 deletions k8s/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: v1
kind: Pod
metadata:
name: node-pod
namespace: node-app
namespace: node155

spec:
containers:
- name: node-container
image: trainwithshubham/node-app-batch-6
image: darshif5/simple-node-app:node-todo
ports:
- containerPort: 8000
6 changes: 3 additions & 3 deletions k8s/replica-sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: node-app-replica-set
namespace: node-app
namespace: node155
labels:
app: guestbook
tier: node-label
Expand All @@ -14,10 +14,10 @@ spec:
tier: node-label
template:
metadata:
namespace: node-app
namespace: node155
labels:
tier: node-label
spec:
containers:
- name: node-container-rep
image: trainwithshubham/node-app-batch-6
image: darshif5/simple-node-app:node-todo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address the security concerns raised by the static analysis hints.

The updated container image (darshif5/simple-node-app:node-todo) should be reviewed to ensure it follows security best practices:

  1. Ensure that the container does not require or run with allowPrivilegeEscalation unless absolutely necessary. If privilege escalation is required, consider using a more granular security context or pod security policies to limit the scope of escalation.

  2. Avoid running the container as root. Instead, use a dedicated user with minimal required permissions. If root access is necessary for specific tasks, consider using securityContext.runAsNonRoot and securityContext.runAsUser to enforce running as a non-root user by default.

Do you want me to open a GitHub issue to track these security enhancements or provide guidance on implementing the recommended changes?

Tools
checkov

[MEDIUM] 1-23: Containers should not run with allowPrivilegeEscalation

(CKV_K8S_20)


[MEDIUM] 1-23: Minimize the admission of root containers

(CKV_K8S_23)

2 changes: 1 addition & 1 deletion k8s/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: node-app-service
namespace: node-app
namespace: node155
spec:
type: NodePort
selector:
Expand Down
95 changes: 0 additions & 95 deletions kustomize/README.md

This file was deleted.

Loading