# Ensure Global repo_gpgcheck is Enabled for Repository Metadata Verification

- Source: https://support.icompaas.com/support/solutions/articles/62000234997-ensure-global-repo-gpgcheck-is-enabled-for-repository-metadata-verification
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** • Level 2

**Description:**  
 The repo\_gpgcheck option enforces verification of repository metadata signatures using GPG keys. Enabling this setting globally ensures that the metadata used by package managers to list and retrieve packages is verified, preventing the use of tampered or malicious repository information.

**Rationale:** Activating repo\_gpgcheck globally enhances security by ensuring repository metadata integrity, reducing risks from compromised or malicious repositories.

**Impact:** Pros:

-   Prevents use of unsigned or malicious repository metadata.  
    
-   Strengthens overall package management security.  
    

Cons:

-   Misconfiguration may cause repository access issues if keys are missing or invalid.  
    

**Default Value:** The repo\_gpgcheck option is often disabled by default and must be explicitly enabled.

**Pre-requisites:**

-   Root or sudo privileges to modify repository configuration files.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Check current global repo\_gpgcheck setting in /etc/yum.conf:  
    
    grep -i '^repo\_gpgcheck' /etc/yum.conf
    
2.  Confirm that the value is set to 1 (enabled).
    

### **Implementation Plan:**

**Using Linux command line:**

1.  Edit /etc/yum.conf and add or modify the line:  
    
    repo\_gpgcheck=1
    
2.  Save the file and exit.  
    
3.  Test repository access and package listing.  
    

### **Backout Plan:**

**Using Linux command line:**

1.  Remove or set repo\_gpgcheck=0 in /etc/yum.conf to disable.
    
2.  Save and test package manager functionality.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   Red Hat Yum Repository Configuration

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
