-
Notifications
You must be signed in to change notification settings - Fork 1
Added kubernetes manifest #9
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: webportal | ||
| --- | ||
| apiVersion: apps/v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| kind: Deployment | ||
| metadata: | ||
| name: nginx-deploy | ||
| namespace: webportal | ||
| labels: | ||
| dep: nginxdep | ||
| spec: | ||
| replicas: 2 | ||
| selector: | ||
| matchLabels: | ||
| name: nginx | ||
| template: | ||
| metadata: | ||
| labels: | ||
| name: nginx | ||
| spec: | ||
| automountServiceAccountToken: false | ||
| containers: | ||
| - name: nginx | ||
| image: nginx@sha256:fcc42aef11edacef6408663bb3e8ebb0f83cf1d958a0cb97973106cb7f618e49 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| resources: | ||
| limits: | ||
| memory: 512Mi | ||
| cpu: 500m | ||
| requests: | ||
| memory: 256Mi | ||
| cpu: 250m | ||
| ports: | ||
| - containerPort: 80 | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: nginx-lb | ||
| namespace: webportal | ||
| spec: | ||
| selector: | ||
| name: nginx | ||
| ports: | ||
| - port: 80 | ||
| targetPort: 80 | ||
| type: LoadBalancer | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,9 +11,10 @@ resource "aws_s3_bucket" "data" { | |
| git_file = "terraform/aws/s3.tf" | ||
| git_last_modified_at = "2021-10-05 15:00:19" | ||
| git_last_modified_by = "bm.almeida@gmail.com" | ||
| git_modifiers = "bm.almeida" | ||
| git_modifiers = "65456094+bmppa/bm.almeida" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| git_org = "bmppa" | ||
| git_repo = "iac-demo" | ||
| yor_trace = "8cebc6f3-14b0-4a60-bd65-7988a2c206f1" | ||
| yor_name = "data" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,5 +29,6 @@ resource "google_storage_bucket" "my-bucket" { | |
| git_org = "bmppa" | ||
| git_repo = "iac-demo" | ||
| yor_trace = "508a085e-51db-4b56-9177-c62fec5b31cd" | ||
| yor_name = "my-bucket" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource: Deployment.webportal.nginx-deploy | ID:
BC_K8S_37How to Fix
Description
Linux namespaces provide isolation for running processes and limits access to system resources. To prevent privilege-escalation attacks from within a container, we recommend that you configure your container’s applications to run as unprivileged users. The mapped user is assigned a range of UIDs which function within the namespace as normal UIDs from 0 to 65536, but have no privileges on the host machine itself.If a process attempts to escalate privilege outside of the namespace, the process is running as an unprivileged high-number UID on the host, not mapped to a real user. This means the process has no privileges on the host system and cannot be attacked by this method.
This check will trigger below UID 10,000 as common linux distributions will assign UID 1000 to the first non-root, non system user and 1000 users should provide a reasonable buffer.
Dependent Resources
Calculating...