-
Notifications
You must be signed in to change notification settings - Fork 1
new dockerfile #4
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 |
|---|---|---|
| @@ -1,33 +1,7 @@ | ||
| # Local .terraform directories | ||
| **/.terraform/* | ||
| .idea | ||
| # Ignore npm installed packages | ||
| /node_modules | ||
|
|
||
| # .tfstate files | ||
| *.tfstate | ||
| *.tfstate.* | ||
| # Ignore coverage reports | ||
| /coverage | ||
|
|
||
| # Crash log files | ||
| crash.log | ||
|
|
||
| # Ignore any .tfvars files that are generated automatically for each Terraform run. Most | ||
| # .tfvars files are managed as part of configuration and so should be included in | ||
| # version control. | ||
| # | ||
| # example.tfvars | ||
|
|
||
| # Ignore override files as they are usually used to override resources locally and so | ||
| # are not checked in | ||
| override.tf | ||
| override.tf.json | ||
| *_override.tf | ||
| *_override.tf.json | ||
| credentials.json | ||
| *.tfbackend | ||
| *.tfvars | ||
|
|
||
| # Include override files you do wish to add to version control using negated pattern | ||
| # | ||
| # !example_override.tf | ||
|
|
||
| # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan | ||
| # example: *tfplan* | ||
| .idea |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
|
|
||
| - name: Verify tests | ||
| hosts: all | ||
| gather_facts: False | ||
| tasks: | ||
| - name: Install, configure, and start Apache | ||
| block: | ||
| - name: Install httpd and memcached | ||
| ansible.builtin.yum: | ||
| name: | ||
| - httpd | ||
| - memcached | ||
| sslverify: False | ||
| state: latest | ||
|
|
||
| - name: Apply the foo config template | ||
| ansible.builtin.template: | ||
| src: templates/src.j2 | ||
| dest: /etc/foo.conf | ||
|
|
||
| - name: Start service bar and enable it | ||
| ansible.builtin.service: | ||
| name: bar | ||
| state: started | ||
| enabled: True | ||
| when: ansible_facts['distribution'] == 'CentOS' | ||
| become: true | ||
| become_user: root | ||
| ignore_errors: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| - name: Verify tests | ||
| hosts: all | ||
| gather_facts: False | ||
| tasks: | ||
| - name: Install, configure, and start Apache | ||
| block: | ||
| - name: Install httpd and memcached | ||
|
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.
|
||
| ansible.builtin.yum: | ||
| name: | ||
| - httpd | ||
| - memcached | ||
| sslverify: False | ||
| state: latest | ||
|
|
||
| - name: Apply the foo config template | ||
| ansible.builtin.template: | ||
| src: templates/src.j2 | ||
| dest: /etc/foo.conf | ||
|
|
||
| - name: Start service bar and enable it | ||
| ansible.builtin.service: | ||
| name: bar | ||
| state: started | ||
| enabled: True | ||
| when: ansible_facts['distribution'] == 'CentOS' | ||
| become: true | ||
| become_user: root | ||
| ignore_errors: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
|
|
||
| - name: Verify tests | ||
| hosts: all | ||
| gather_facts: False | ||
| tasks: | ||
| - name: 1st level block | ||
| block: | ||
| - name: 2nd level block | ||
| block: | ||
| - name: 3rd level block | ||
| block: | ||
| - name: 4th level block | ||
| block: | ||
| - name: 5th level block | ||
| block: | ||
| - name: 6th level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com | ||
| - name: 5th level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com | ||
| - name: 4th level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com | ||
| - name: 3rd level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com | ||
| - name: 2nd level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com | ||
| - name: 1st level uri | ||
| ansible.builtin.uri: | ||
| url: https://www.example.com |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
|
|
||
| - name: Sample play | ||
| hosts: | ||
| - test | ||
| roles: | ||
| - role: somerole |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
|
|
||
| - name: Verify tests | ||
| hosts: all | ||
| gather_facts: False | ||
| tasks: | ||
| - name: Get Running instance Info | ||
| amazon.aws.ec2_instance_info: | ||
| register: ec2info | ||
|
|
||
| - name: enabled | ||
|
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.
|
||
| amazon.aws.ec2_instance: | ||
| name: "public-compute-instance" | ||
| key_name: "prod-ssh-key" | ||
| vpc_subnet_id: subnet-5ca1ab1e | ||
| instance_type: c5.large | ||
| security_group: default | ||
| network: | ||
| assign_public_ip: true | ||
| image_id: ami-123456 | ||
| ebs_optimized: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| - hosts: localhost | ||
| gather_facts: false | ||
| tasks: | ||
| - name: Launch ec2 instances 1 | ||
|
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.
|
||
| #checkov:skip=CKV_AWS_135 | ||
| amazon.aws.ec2_instance: | ||
| name: "bc-office-hours" | ||
| vpc_subnet_id: subnet-012d94ee641ab4277 | ||
| instance_type: t3.micro | ||
| security_group: sg-04acc4e02a5b71244 | ||
| image_id: "{{ ami_latest.image_id }}" | ||
| state: running | ||
|
|
||
| - name: Launch ec2 instances 2 | ||
| amazon.aws.ec2_instance: | ||
| #checkov:skip=CKV_AWS_88 | ||
| name: "bc-office-hours" | ||
| vpc_subnet_id: subnet-012d94ee641ab4277 | ||
| instance_type: t3.micro | ||
| security_group: sg-04acc4e02a5b71244 | ||
| image_id: "{{ ami_latest.image_id }}" | ||
| state: running | ||
|
|
||
| - name: http | ||
| #checkov:skip=CKV2_ANSIBLE_1 | ||
| uri: | ||
| url: http://www.example.com | ||
| return_content: yes | ||
| register: this | ||
| failed_when: "'AWESOME' not in this.content" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
|
|
||
| - name: Check that you can connect (GET) to a page | ||
| uri: | ||
| url: https://www.example.com | ||
|
|
||
| - name: Download foo.conf | ||
|
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.
|
||
| ansible.builtin.get_url: | ||
| url: https://example.com/path/file.conf | ||
| dest: /etc/foo.conf | ||
| mode: '0440' | ||
| validate_certs: false | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM node:12-alpine | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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. got 6.7.1 / dockerfile.FROMTotal vulnerabilities: 1
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. request 2.88.0 / dockerfile.FROMTotal vulnerabilities: 1
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. tar 4.4.19 / dockerfile.FROMTotal vulnerabilities: 1
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. ansi-regex 4.1.0 / dockerfile.FROMTotal vulnerabilities: 1
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. ansi-regex 3.0.0 / dockerfile.FROMTotal vulnerabilities: 1
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. qs 6.5.2 / dockerfile.FROMTotal vulnerabilities: 1
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. http-cache-semantics 3.8.1 / dockerfile.FROMTotal vulnerabilities: 1
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. semver 5.7.1 / dockerfile.FROMTotal vulnerabilities: 1
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. minimatch 3.0.4 / dockerfile.FROMTotal vulnerabilities: 1
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. decode-uri-component 0.2.0 / dockerfile.FROMTotal vulnerabilities: 2
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. openssl 1.1.1n-r0 / dockerfile.FROMTotal vulnerabilities: 13
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. minimist 1.2.5 / dockerfile.FROMTotal vulnerabilities: 1
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. zlib 1.2.12-r0 / dockerfile.FROMTotal vulnerabilities: 2
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. busybox 1.34.1-r5 / dockerfile.FROMTotal vulnerabilities: 1
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. tough-cookie 2.4.3 / dockerfile.FROMTotal vulnerabilities: 1
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. ip 1.1.5 / dockerfile.FROMTotal vulnerabilities: 2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV NODE_ENV "production" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV PORT 8079 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EXPOSE 8079 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN addgroup mygroup && adduser -D -G mygroup myuser && mkdir -p /usr/src/app && chown -R myuser /usr/src/app | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Prepare app directory | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WORKDIR /usr/src/app | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY package.json /usr/src/app/ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY yarn.lock /usr/src/app/ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN chown myuser /usr/src/app/yarn.lock | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| USER myuser | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN yarn install | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| COPY . /usr/src/app | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Start the app | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CMD ["/usr/local/bin/npm", "start"] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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: tasks.block.ansible.builtin.yum.Install httpd and memcached | Checkov ID: CKV_ANSIBLE_4
Description
This policy detects whether Ansible yum tasks have SSL validation disabled. Disabling SSL validation can significantly increase security risks as it allows the system to accept potentially compromised SSL certificates without verification. This could result in exposing the system to potential man-in-the-middle attacks.