Completed upto lesson 30
This commit is contained in:
35
lab/lesson-29-answer.yaml
Normal file
35
lab/lesson-29-answer.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: test-network-policy
|
||||
namespace: storefront
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: payments-mesh
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: payments-api
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
ports:
|
||||
- port: 53
|
||||
protocol: TCP
|
||||
- port: 53
|
||||
protocol: UDP
|
||||
|
||||
27
lab/lesson-30-answer.md
Normal file
27
lab/lesson-30-answer.md
Normal file
@@ -0,0 +1,27 @@
|
||||
docker run --rm ghcr.io/anchore/syft:v1.50.0 nginx:1.27-alpine -o cyclonedx-json > .\lab\lesson-30-sbom.json
|
||||
|
||||
nginx:1.27-alpine, CycloneDX json
|
||||
|
||||
{
|
||||
"type": "application",
|
||||
"author": "anchore",
|
||||
"name": "syft",
|
||||
"version": "1.50.0"
|
||||
}
|
||||
"bom-ref": "7cfd11f0aac064b9",
|
||||
"type": "container",
|
||||
"name": "nginx",
|
||||
"version": "1.27-alpine"
|
||||
"bom-ref": "pkg:apk/alpine/alpine-baselayout@3.6.8-r1?arch=x86_64&distro=alpine-3.21.3&package-id=0df337d25a2602d5",
|
||||
|
||||
|
||||
"type": "library",
|
||||
"publisher": "Natanael Copa <ncopa@alpinelinux.org>",
|
||||
"name": "alpine-baselayout",
|
||||
"version": "3.6.8-r1",
|
||||
"description": "Alpine base dir structure and init scripts",
|
||||
|
||||
|
||||
it inventories components but does not determine whether the image is free of vulnerabilities or safe to deploy
|
||||
|
||||
bom helps after new CVE by revealing if the packege is install insude the image and also if the vulnerable version is running
|
||||
21688
lab/lesson-30-sbom.json
Normal file
21688
lab/lesson-30-sbom.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user