Skip to content

Commit

Permalink
🧹 mark private resources as private (#4319)
Browse files Browse the repository at this point in the history
* feat: mark private resources as private

* cleanup
  • Loading branch information
slntopp authored Jul 8, 2024
1 parent bc3c52d commit fc899f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 7 additions & 7 deletions providers/os/resources/os.lr
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ docker.file @defaults("file.path instructions.length stages.length") {
}

// Dockerfile stages
docker.file.stage @defaults("from.name") {
private docker.file.stage @defaults("from.name") {
// The source of this stage, specified via `FROM` in Dockerfiles
from docker.file.from
// Contains the reference to the Dockerfile this stage belongs to
Expand All @@ -795,23 +795,23 @@ docker.file.stage @defaults("from.name") {
}

// Dockerfile USER instructions
docker.file.user @defaults("user") {
private docker.file.user @defaults("user") {
// Set the user name or UID
user string
// Set the user group or GID (optional)
group string
}

// Dockerfile EXPOSE instruction
docker.file.expose @defaults("port protocol") {
private docker.file.expose @defaults("port protocol") {
// Port that is exposed
port int
// Protocol that is exposed (evaluates to `tcp` if not specified)
protocol string
}

// Dockerfile FROM instructions
docker.file.from @defaults("name image tag") {
private docker.file.from @defaults("name image tag") {
platform string
image string
tag string
Expand All @@ -820,20 +820,20 @@ docker.file.from @defaults("name image tag") {
}

// Dockerfile RUN instructions
docker.file.run @defaults("script") {
private docker.file.run @defaults("script") {
script string
}

// Dockerfile ADD instructions
docker.file.add @defaults("src dst") {
private docker.file.add @defaults("src dst") {
src []string
dst string
chown string
chmod string
}

// Dockerfile COPY instructions
docker.file.copy @defaults("src dst") {
private docker.file.copy @defaults("src dst") {
// Optional source to copy file(s) from when not using the default build context
src []string
// The destination in the image for the file(s)
Expand Down
7 changes: 7 additions & 0 deletions providers/os/resources/os.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ resources:
chown: {}
dst: {}
src: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile ADD reference
Expand All @@ -160,6 +161,7 @@ resources:
chown: {}
dst: {}
src: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile COPY reference
Expand All @@ -168,6 +170,7 @@ resources:
fields:
port: {}
protocol: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile EXPOSE reference
Expand All @@ -179,13 +182,15 @@ resources:
name: {}
platform: {}
tag: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile FROM reference
url: https://docs.docker.com/reference/dockerfile/#from
docker.file.run:
fields:
script: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile RUN reference
Expand All @@ -203,6 +208,7 @@ resources:
labels: {}
run: {}
user: {}
is_private: true
min_mondoo_version: 9.0.0
refs:
- title: Dockerfile Reference
Expand All @@ -213,6 +219,7 @@ resources:
fields:
group: {}
user: {}
is_private: true
min_mondoo_version: 9.0.0
docker.image:
fields:
Expand Down

0 comments on commit fc899f3

Please sign in to comment.