Skip to content

Commit

Permalink
Disable scanning for http connections without TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
widhalmt committed Oct 23, 2024
1 parent 118b512 commit f51fa0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions molecule/elasticsearch_no-security/verify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
# This is an example playbook to execute Ansible tests.
# kics-scan disable=2e8d4922-8362-4606-8c14-aa10466a1ce3
# above command will disable scanning for `http` (without `s`)
# connections

- name: Verify
hosts: all
Expand All @@ -9,7 +11,6 @@
tasks:

# Remember, this is the no-security scenario. So no https
# kics-scan ignore-block
- name: Health check
ansible.builtin.uri:
url: http://localhost:{{ elasticstack_elasticsearch_http_port }}/_cluster/health

Check warning on line 16 in molecule/elasticsearch_no-security/verify.yml

View workflow job for this annotation

GitHub Actions / kics

[MEDIUM] Communication Over HTTP

Using HTTP URLs (without encryption) could lead to security vulnerabilities and risks
Expand All @@ -23,7 +24,6 @@
delay: 10
when: groups[elasticstack_elasticsearch_group_name] | length > 1

# kics-scan ignore-block
- name: Node check
ansible.builtin.uri:
url: http://localhost:{{ elasticstack_elasticsearch_http_port }}/_cat/nodes

Check warning on line 29 in molecule/elasticsearch_no-security/verify.yml

View workflow job for this annotation

GitHub Actions / kics

[MEDIUM] Communication Over HTTP

Using HTTP URLs (without encryption) could lead to security vulnerabilities and risks
Expand Down
4 changes: 3 additions & 1 deletion roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# kics-scan disable=2e8d4922-8362-4606-8c14-aa10466a1ce3
# above command will disable scanning for `http` (without `s`)
# connections

- name: Check for versions
ansible.builtin.fail:
Expand Down Expand Up @@ -244,7 +247,6 @@
enabled: yes
register: elasticsearch_freshstart

# kics-scan ignore-block
- name: Handle cluster setup without security
when: not elasticsearch_security | bool
block:
Expand Down

0 comments on commit f51fa0f

Please sign in to comment.