DevOps Engineers
Introduction
DevOps engineers play a crucial role in ensuring that a company’s infrastructure, deployment processes, and operational practices are aligned with security, privacy, safety, and regulatory compliance policies. Resource surveillance (surveilr
) helps DevOps engineers validate adherence to these policies by extracting compliance evidence from machine attestation artifacts, simplifying the process of maintaining compliance without the need for manual documentation.
Capturing Compliance Evidence with surveilr
surveilr
provides several types of ingestion commands for DevOps engineers to execute. These commands captures compliance evidence from Work Product Artifacts (WPAs) and store them in a Resource Surveillance State Database (RSSD) named resource-surveillance.sqlite.db
, under the uniform_resource table.
Evidence Types
- Compliance Evidence: Shows adherence to policies.
- Non-Compliance Evidence: Highlights deviations from policies.
Common Commands
-
To ingest files in the current directory:
-
Testing shell tasks
-
To run queries in RSSDs:
Examples of Work Product Artifacts (WPAs)
Infrastructure Compliance
A company’s policy might state: “All infrastructure must be provisioned and maintained according to best practices and regulatory standards.” This policy includes the following requirements:
- Use Infrastructure as Code (IaC) tools like Terraform or Ansible.
- Regularly update infrastructure components to the latest versions.
- Perform routine security audits and patches.
Using surveilr
for Policy Compliance and Evidence Capture
To automate tasks related to security audits and updates, DevOps engineers can utilize surveilr
commands to streamline compliance validation:
-
Security Audits:
-
Execute CNQuery scans using predefined packs for AWS inventory and Linux incident response:
This command ingests tasks from a JSONL file (
cloud-cnquery.jsonl
) that includes CNQuery tasks to scan AWS and Linux environments for security compliance.
-
-
Remote Server Integration:
-
Merge data from remote servers into a consolidated RSSD using:
This command merges data collected from various remote servers, creating an aggregated RSSD, which can be queried for compliance evidence.
-
SQL Query for Verification of Infrastructure Compliance
Compliance Evidence
Host Name | Component | Version | Compliance Status | Last Update Date |
---|---|---|---|---|
HostName_1 | Terraform | 1.1.0 | Compliant | 2024-06-01 |
HostName_2 | Ansible | 2.10.7 | Compliant | 2024-06-10 |
Non-compliance Evidence
Host Name | Component | Version | Compliance Status | Last Update Date |
---|---|---|---|---|
HostName_1 | Terraform | 0.12.0 | Non-Compliant | 2024-05-15 |
HostName_2 | Ansible | 2.9.6 | Non-Compliant | 2024-06-01 |
CI/CD Pipeline
A company’s policy mandates that all code deployments pass through a CI/CD pipeline, including testing and security scanning stages, and automation of deployment processes. This policy includes the following requirements:
- Use CI/CD tools like GitLab CI, or GitHub Actions.
- Ensure pipelines include testing and security scanning stages.
- Automate deployment processes.
Using surveilr
for Policy Compliance and Evidence Capture
Here are examples of how surveilr
commands can be applied to enhance compliance and operational efficiency:
-
Penetration Toolkit Integration:
-
Automate security assessments using tools like Nmap via GitHub Actions:
This workflow automates network scans using Nmap and uploads results to an S3 bucket, which can then be merged with the ARSSD for compliance evidence using
surveilr
.
-
-
Assurance GitLab CI/CD Integration:
-
Use GitLab CI/CD to manage and deploy assurance databases (
ATC assurance.db
) tosuite.opsfolio.com
:This GitLab CI/CD pipeline automates the generation and deployment of assurance databases (
aggregated-assurance.db
) tosuite.opsfolio.com
, leveragingsurveilr
to maintain compliance and generate evidence for audits.
-
SQL Query for Verification of CI/CD Pipeline Compliance
Compliance Evidence
Host Name | Pipeline Name | Pipeline Status | Last Run Date | Security Scan Passed |
---|---|---|---|---|
HostName_1 | Build and Deploy | Successful | 2024-06-01 | Yes |
HostName_2 | Integration Tests | Successful | 2024-06-10 | Yes |
Non-compliance Evidence
Host Name | Pipeline Name | Pipeline Status | Last Run Date | Security Scan Passed |
---|---|---|---|---|
HostName_1 | Build and Deploy | Failed | 2024-05-15 | No |
HostName_2 | Integration Tests | Failed | 2024-06-01 | No |
-
GitHub Integration:
- Use
surveilr
to ingest configuration data from GitHub repositories: This command imports configuration data (plm
) from GitHub repositories (organization_name/repository_name
) into the SQLite database (dbname.sqlite.db
). It ensures configurations are captured and stored for compliance validation.
- Use
-
Jira Integration:
-
Similarly, integrate with Jira to manage configuration data:
This command imports project lifecycle management (PLM) data from Jira (
jira_account_url/project_name
) into the SQLite database (dbname.sqlite.db
). It supports batch ingestion (-b
) and optionally includes or excludes archived data (-e
). This integration ensures configurations tracked in Jira are compliant with organizational standards.
-
Monitoring and Logging
A company’s policy mandates that all systems must have monitoring and logging enabled using tools like Prometheus or Grafana, with centralized logging via ELK stack, and alerts set up for critical events.This policy includes the following requirements:
- Use monitoring tools like Prometheus or Grafana.
- Implement centralized logging with tools like ELK stack.
- Set up alerts for critical events.
Using surveilr
for Policy Compliance and Evidence Capture
Integrate surveilr
commands to gather alerts and ensure compliance with monitoring and logging policies:
-
IMAP Integration for Alerts Collection:
- Collect alerts from monitoring tools (e.g., Prometheus or Grafana) and send them to email addresses. Use
surveilr
to ingest these alerts into the RSSD: This command retrieves alerts from an IMAP mailbox (folder_name
) associated with Microsoft 365 email service, using credentials (client_id, client_secret
), and stores them in the RSSD. It facilitates compliance monitoring and evidence collection for alert management.
- Collect alerts from monitoring tools (e.g., Prometheus or Grafana) and send them to email addresses. Use
-
GitHub Integration:
- Use
surveilr
to ingest configuration data from GitHub repositories: This command retrieves data from GitHub repositories (organization_name/repository_name
) into the SQLite database (dbname.sqlite.db
).It facilitates compliance monitoring and evidence collection of github tickets.
- Use
-
Jira Integration:
-
Similarly, integrate with Jira to manage configuration data:
This command imports project lifecycle management (PLM) data from Jira (
jira_account_url/project_name
) into the SQLite database (dbname.sqlite.db
). It supports batch ingestion (-b
) and optionally includes or excludes archived data (-e
).
-
SQL Query for Verification of Monitoring and Logging Compliance
Compliance Evidence
Host Name | Monitoring Tool | Logging Tool | Alerts Enabled | Last Check Date |
---|---|---|---|---|
HostName_1 | Prometheus | ELK Stack | Yes | 2024-06-01 |
HostName_2 | Grafana | ELK Stack | Yes | 2024-06-10 |
Non-compliance Evidence
Host Name | Monitoring Tool | Logging Tool | Alerts Enabled | Last Check Date |
---|---|---|---|---|
HostName_1 | Prometheus | None | No | 2024-05-15 |
HostName_2 | None | ELK Stack | No | 2024-06-01 |
Security Compliance
A company’s policy might state: “All systems must adhere to security best practices and undergo regular security assessments.” This policy includes the following requirements:
- Implement security controls like firewalls and intrusion detection systems.
- Conduct regular vulnerability assessments and penetration tests.
- Ensure compliance with security standards like ISO 27001 or NIST.
Using surveilr
for Policy Compliance and Evidence Capture
Utilize surveilr
commands to enforce and verify security compliance measures:
- UDI PGP:
-
UDI PostgreSQL Proxy for remote SQL is a CLI tool starts up a server which pretends to be PostgreSQL but proxies its SQL to other CLI commands (called SQL Suppliers).
This initiates the surveilr tool to perform operations related to UDI-PGP. You can now use psql to send a query to the daemon.
for example:
-
SQL Query for Verification of Security Compliance Compliance
Compliance Evidence
Host Name | Security Control | Assessment Date | Compliance Status | Findings |
---|---|---|---|---|
HostName_1 | Firewall | 2024-06-01 | Compliant | None |
HostName_2 | Intrusion Detection | 2024-06-10 | Compliant | None |
Non-compliance Evidence
Host Name | Security Control | Assessment Date | Compliance Status | Findings |
---|---|---|---|---|
HostName_1 | Firewall | 2024-05-15 | Non-Compliant | Open Ports |
HostName_2 | Intrusion Detection | 2024-06-01 | Non-Compliant | Outdated Signatures |
By following these structured queries and ensuring the storage of evidence in the RSSD, DevOps engineers can systematically monitor and ensure adherence to company policies using surveilr
.