# Ensure Automatic Error Reporting is not enabled

Automatic error reporting services, such as Apport, collect and transmit system and application crash data to developers. While useful for debugging, this functionality poses a security risk by potentially exfiltrating sensitive information contained within memory dumps, process environments, or log files. This data could include user credentials, private keys, or confidential business data. Disabling or removing this service is crucial in secure environments to prevent unintentional data leakage. The audit script verifies the status by checking the 'enabled' flag in `/etc/default/apport` or the installation status of the package. The remediation script either sets this flag to '0' (disabled) or completely removes the 'apport' package. The Basic state ('0') simply disables the service, meeting the minimum compliance but leaving the package on the system. The Moderate and Strict states ('Not Installed') recommend complete removal of the package, which is the most secure posture as it eliminates the service entirely, reduces the system's attack surface, and prevents accidental re-activation.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['0']` |
| **Moderate** | `['Not Installed']` |
| **Strict** | `['Not Installed']` |
| **Type** | `ENUM` |

## Audit Script Working

Bash script that checks the status of the Apport service. If the configuration file `/etc/default/apport` exists, it should read the value of the 'enabled' directive. The script must output only the value ('0' for disabled, '1' for enabled) with no extra text. If the file or package is not present, it should output 'Not Installed'.

## Remediation Script Working

Bash script that accepts a single argument to configure the Apport service. If the argument is '0' or '1', it should modify the `enabled` directive in `/etc/default/apport`. If the argument is 'Not Installed', it must attempt to uninstall the 'apport' package. The script must return 'true' on success and 'false' on failure.

