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

fixing FROM rule #124

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion config/default_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "error"
message: "No tag is used"
description: "lorem ipsum tar"
Expand Down
3 changes: 2 additions & 1 deletion sample_rules/basic_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "error"
message: "No tag is used"
description: "No tag is used. It is recommended that a specific tag is used in the FROM line or *-released which is the latest supported release."
Expand Down
3 changes: 2 additions & 1 deletion sample_rules/basic_rules_atomic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "error"
message: "No tag is used"
description: "lorem ipsum tar"
Expand Down
3 changes: 2 additions & 1 deletion sample_rules/default_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "error"
message: "No tag is used"
description: "lorem ipsum tar"
Expand Down
3 changes: 2 additions & 1 deletion sample_rules/openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "error"
message: "No tag is used"
description: "lorem ipsum tar"
Expand Down
3 changes: 2 additions & 1 deletion sample_rules/osbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
- "#from"
-
label: "no_tag"
regex: /^[:]/
regex: /:/
inverse_rule: true
level: "warn"
message: "No tag is used"
description: "lorem ipsum tar"
Expand Down
2 changes: 1 addition & 1 deletion test/data/dockerfiles/TestLabels
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

# Pull base image.
FROM dockerfile/ubuntu
FROM ubuntu:14.04
Copy link
Contributor

@PeterDaveHello PeterDaveHello Oct 6, 2019

Choose a reason for hiding this comment

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

This is not related?

Copy link
Author

Choose a reason for hiding this comment

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

Rule: No tag is used. It is recommended that a specific tag is used in the FROM line or *-released which is the latest supported release.

This test case does not pass this rule

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I got it, thanks for the explanation!


# Install Nginx.

Expand Down