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

Use newest format-hcl with fixed return codes #78

Merged
merged 1 commit into from
Feb 1, 2023
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM devopsinfra/docker-terragrunt:slim-latest as builder

# Use a clean tiny image to store artifacts in
FROM ubuntu:jammy-20221130
FROM ubuntu:jammy-20230126
Copy link

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection

Type: Missing User Instruction

Description: A user should be specified in the dockerfile, otherwise the image will run as root

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

  • First of all, check if your container is running as a root user. In most of the cases, you can do it by running a command like this: docker run <image> whoami. If it returns root, then you should consider using a non-root user, by following one of the next steps:
    • If a non-root user already exists in your container, consider using it.
    • If not, you can create a new user by adding a USER command to the Dockerfile, with a non-root user as argument, for example: USER <non-root-user-name>.
Suggested change
FROM ubuntu:jammy-20230126
FROM ubuntu:jammy-20230126
RUN addgroup --system <group>
RUN adduser --system <user> --ingroup <group>
USER <user>:<group>

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command

Copy link
Member

Choose a reason for hiding this comment

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

#jit_ignore_accept


# Labels for http://label-schema.org/rc1/#build-time-labels
# And for https://github.com/opencontainers/image-spec/blob/master/annotations.md
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
phony: help

# Release tag for the action
VERSION := v0.3.5
VERSION := v0.3.6

# GitHub Actions bogus variables
GITHUB_REF ?= refs/heads/null
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Features:

```yaml
- name: Fail on malformatted files
uses: devops-infra/action-format-hcl@v0.3.5
uses: devops-infra/action-format-hcl@v0.3.6
with:
list: false
write: true
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Fail on malformatted files
uses: devops-infra/action-format-hcl@v0.3.5
uses: devops-infra/action-format-hcl@v0.3.6
with:
check: true
```
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Format HCL files
uses: devops-infra/action-format-hcl@v0.3.5
uses: devops-infra/action-format-hcl@v0.3.6
- name: Commit changes to repo
uses: devops-infra/action-commit-push@master
with:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ outputs:
description: List of formatted files
runs:
using: docker
image: docker://devopsinfra/action-format-hcl:v0.3.5
image: docker://devopsinfra/action-format-hcl:v0.3.6
branding:
color: purple
icon: upload-cloud