Security policy audit events
## Release post GitLab Ultimate now provides comprehensive audit trails for security policy management, giving security and compliance teams unprecedented visibility into policy changes and enforcement effectiveness. This enhancement addresses a critical need for organizations to track, monitor, and demonstrate compliance with their security governance requirements. **Key Capabilities:** * **Complete policy change tracking** with detailed metadata stored centrally in Security Policy Projects. * **Enforcement failure monitoring** including pipeline execution failures, missing security scans, and policy violation detection. * **Real-time visibility** with events available within 5 minutes and streaming-only options for high-volume scenarios. * **Compliance-ready reporting** with tamper-proof audit logs and security policy-specific filtering. **Why It Matters:** This strengthens your security posture by ensuring no policy change or enforcement failure goes unnoticed. Security teams can now demonstrate regulatory compliance through comprehensive audit trails, investigate incidents faster with detailed policy violation context, and reduce audit noise with centralized, relevant security events. ## Background Maintaining robust security policies is crucial for protecting organizational assets and data in today's rapidly evolving cybersecurity landscape. However, simply having policies in place is not enough; we must also ensure that these policies are consistently updated, properly enforced, and any violations are promptly detected and addressed. This Epic aims to enhance our security posture by implementing comprehensive tracking and auditing mechanisms for security policy changes and enforcement violations. ## Objectives 1. Implement logging for all changes made to Security Policies within the designated Security Policy project. 2. Establish a system to log all events where Security Policies failed to be enforced. ## Expected Outcomes 1. A comprehensive audit trail of all security policy changes, including who made the changes, when, and what was modified. 2. Detailed logs of all instances where security policies failed to be enforced, including the specific policy, affected system, and contextual information. 3. Enhanced visibility for security teams and auditors into policy lifecycle and enforcement effectiveness. 4. Improved ability to demonstrate compliance with regulatory requirements and internal governance standards. 5. Faster incident response and root cause analysis for security policy violations. 6. Simplify/consolidate generated audit events to reduce noise in audit trails. ## Success Criteria 1. 100% of security policy changes in the designated project are logged with complete metadata (who, what, when). 2. All instances of security policy enforcement failures are logged with relevant context. 3. Audit logs are accessible to authorized personnel within 5 minutes of an event occurring. 4. The logging system can handle the expected volume of events without significant performance degradation. 5. Auditors confirm that the new logging system meets their requirements for transparency and accountability. 6. Security and compliance teams report improved efficiency in investigating policy violations and demonstrating compliance. ## Potential Challenges 1. Integration complexity with diverse systems and applications subject to security policies. 2. Balancing comprehensive logging with system performance and storage constraints. 3. Ensuring the logging system itself is secure and tamper-proof. 4. Managing the volume of log data generated and implementing effective data retention policies. 5. Training relevant personnel on interpreting and utilizing the new audit logs effectively. 6. Potential resistance to increased transparency from some stakeholders. By addressing these key points, we aim to significantly enhance our ability to track, enforce, and audit our security policies, ultimately strengthening our overall security posture and compliance readiness. ### Use cases to address: * [x] Simplify audit event logs for policies created and managed at the group/sub-group. * [x] Generate an audit event when policies are changed to reflect which policy was specifically changed * [ ] Generate an audit event when pipeline execution or scan execution policy pipelines or jobs fail. * [ ] Generate an audit event when pipeline execution or scan execution policy pipelines or jobs do not run when they are expected to run. * [x] Generate an audit event when a policy violation is detected from an MR approval policy, with a list of the violations detected. * [x] Generate an audit event when an MR is merged with violations (this may fall more into a different audit event managed by compliance, but we may want to consider both approaches until we have a solution). * [ ] Generate an audit event when enforced stages cannot be applied due to too strict `after` conditions and the pipeline fails. * [x] Generate an audit event if `policy.yml` becomes invalidated. * [x] Generate an audit event if limits are exceeded and a pipeline execution policy is not applied. * [x] Generate an audit event if limits are exceeded and a scan execution policy is not applied. * [x] Generate an audit event if limits are exceeded and an MR approval policy is not applied. * [x] Consolidate and organize audit events generated by SPPs so they are not replicated across projects, but simpler to consume for security/compliance professionals who _manage_ the policies (instead of bound to the context of groups/subgroups/projects). <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> > [!important] > This page may contain information related to upcoming products, features and functionality. > It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. > Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc. <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic