-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 26530b3
Showing
4 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: ansible-lint | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
jobs: | ||
linting: | ||
name: Ansible Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Add Ansible | ||
run: sudo apt-get install -y ansible | ||
|
||
- name: Linting | ||
uses: ansible/ansible-lint@main | ||
with: | ||
requirements_file: "requirements.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
- name: Playbook to remove CUPS related folders and packages | ||
hosts: all | ||
gather_facts: true | ||
become: true | ||
vars: | ||
ansible_python_interpreter: /usr/bin/python3 | ||
tasks: | ||
|
||
- name: GENERAL | remove packages | ||
ansible.builtin.package: | ||
name: | ||
- cups | ||
- cups-bsd | ||
- cups-client | ||
- cups-common | ||
- cups-core-drivers | ||
- cups-daemon | ||
- cups-filters | ||
- cups-filters-core-drivers | ||
- cups-ppdc | ||
- cups-server-common | ||
- cups-browsed | ||
state: absent | ||
|
||
- name: SNAP | remove packages | ||
community.general.snap: | ||
name: | ||
- cups-proxyd | ||
- cups-browsed | ||
- cups | ||
state: absent | ||
failed_when: false | ||
when: | ||
- "'snap' in ansible_env.PATH" | ||
|
||
- name: GENERAL | Remove multiple directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: absent | ||
loop: | ||
- /etc/cups | ||
- /var/spool/cups | ||
- /var/cache/cups | ||
- /var/log/cups | ||
- /var/lib/cups | ||
- /var/snap/cups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[![ansible-lint](https://github.com/LucaMH/CUPS_removal-private/actions/workflows/anisble-lint.yaml/badge.svg)](https://github.com/LucaMH/CUPS_removal-private/actions/workflows/anisble-lint.yaml) | ||
|
||
# Playbook to remove CUPS completly from systems due to recent CUPS vulnerabilities | ||
|
||
## run removal playbook: | ||
```bash | ||
ansible-playbook -l <limit> CUPS_remove.yaml | ||
``` | ||
|
||
## more info about the issues | ||
|
||
from the reporter: https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems-via-CUPS-Part-I/ | ||
|
||
|
||
## found issues with this playbook? | ||
just send a issue or pull request :) | ||
|
||
|
||
|
||
|
||
## DISCLAIMER | ||
If this damages your system or causes issues in your environment its your fault. | ||
I am not responsible for you running stuff you didn't verify before running. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
collections: | ||
- name: community.general |