Xygeni’s Supply Chain Security protect your CI/CD pipelines by scanning configuration files, build scripts, and CI job definitions.
Supply Chain's CI/CD detectors identify deviations from security best practices and standards, providing immediate alerts on potential misconfigurations that could lead to unauthorized access or code or pipeline execution compromises.
With a robust set of rules based on the latest security advisories, Xygeni ensures every component of your pipeline adheres to the highest security protocols.
Detected issues may include improper settings in package managers, insecure build file or infrastructure configurations, or risky CI jobs or plugins, all of which are notified for rapid correction to maintain the integrity and safety of your software delivery processes.
Modern software pipelines integrate multiple tools ranging from SCM repositories and build tools to CI/CD systems and configuration management tools. Misconfigurations at these tools open the door to supply chain attacks.
Examples of misconfigurations are:
unprotected delivery code branches,
lack of code reviews,
poor access control practices like the lack of multi-factor authentication,
publicly accessible storage buckets in the cloud infrastructure,
flaws in CI pipelines, critical data not encrypted at rest,
weak password policies and non-rotated encryption keys,
... and many more
Contextualized remediation procedures are provided, so DevOps engineers can quickly fix the misconfiguration and learn how to avoid similar issues in the future.
Avoid data leakage and malicious code injection, hardening SCM repositories and CI/CD tool configurations.
The misconfigurations are detected across the tools in the cycle chain, from development items like code repositories, build tools, CI systems to operations at IaC templates, container images in registries, or cloud platforms.
Detects misconfigured resources in code and vulnerable images before deploying to your runtime environment.
Here’s an integration of the supported systems into the summary of key misconfiguration detectors for Xygeni:
Enforce appropriate permissions and secure configurations across CI/CD tools and workflows, specifically tailored for platforms like GitHub, GitLab, Azure DevOps, Bitbucket, CircleCI, and Jenkins.
Verify the integrity of build processes and prevent unauthorized code or pipeline changes, with specific checks for each platform to ensure compliance and security.
Monitor for unusual activities and ensure encrypted storage and handling of secrets across all supported CI/CD platforms.
Apply best practices in container configurations, such as avoiding running as root and ensuring secure file operations across various CI environments, including Jenkins and CircleCI.
Maintain secure connections by enforcing HTTPS for remote repository access and ensuring proper version control on platforms like GitHub, GitLab, and Azure DevOps.
Support compliance with key standards like CIS, NIST, and OpenSSF, ensuring security policies are adhered to across all integrated platforms.
Secure source code management practices, including enforcing MFA, signed commits, and code review protocols, particularly on platforms like GitHub, GitLab, and Bitbucket.
Detect and prevent insecure webhook configurations, unprotected branches, and insecure dependencies across all supported systems. • Monitor and validate security policies, ensuring continuous compliance and signed releases within the integrated ecosystem.
To accomplish these functionalities, Xygeni provides a Scanner and a Web UI to view the results.
The process of building and deploying modern software is complicated. The attack surface is wide: compilers, source code repositories and tools (build, package managers, artifact registries, testing, security scanners) can be affected to let code / configuration tampering pass undetected, or to implant malicious behavior.
Software artifacts are often opaque blobs that can’t easily be inspected for security. It is easier to reason about how they came to be (provenance), rather than what is in them. So what can be done to harden the build & deploy system? How can an organization attain tamper-proof builds?
Tamper-proof builds, where the focus is to prevent or detect tampering during the build is hard to achieve and needs a strong hardening of the build platform, which is not always possible. Having signed attestations generated by a hosted build platform is a previous stage, with focus on detecting tampering after the build. For software attestations the following is necessary:
(1) generating “attestations”, authenticated metadata about software artifacts produced by each build step, linked with the inputs (“materials”). Each step in the pipeline must conform with a pipeline layout, where an owner defines the steps and conditions to be fulfilled.
(2) storing the attestations in a kind of evidence repository or "ledger" that keeps evidence preserved.
(3) providing verification capabilities downstream so a client can verify the integrity of the artifact(s) from the ledger before installing / running the artifact(s).
Xygeni provides the infrastructure for generating software attestations in the software pipelines and verifying them downstream when needed. See About Build Security for further information.
Xygeni checks compliance of your software with Software Supply-Chain Security Standards and Guidelines.
Xygeni runs automated audits on software projects and DevOps tools for compliance assessment, under standards and guidelines like OpenSSF Scorecard or CIS Software Supply Chain Security or , among others.
Each standard is composed of a set of checkpoints that are checked against the software project under analysis.A checkpoint belongs to a category, and could be required or optional.The result tells us if the project complies with the standard, with a compliance level.
See supported standards for more information.
TBD
Supply Chains Security web UI can be accessed from the Navigation Bar under the Supply Chain Section.
Supply Chain section contains the following subsections:
Risks (CI/CD) : All the CI/CD security issues at a glance.
Build Attestations : All your project(s) integrity build processes
Compliance : Your project(s) compliance with compliance standards.
The Risks (CI/CD) page provides a comprehensive view of all your project(s) CI/CD risks.
Secrets' Statistics view shows:
Charts for # of issues by severity, by type and by type & severity
A table with the issues (as well as a filter for the table)
You can use filters to select specific issues:
By Funnel Phase (see Prioritization Funnels )
By severity
By issue type
By project (pattern)
By issue status (open, confirmed, muted, etc)
By tag
etc.
In the issues table, by clicking on the icon of any issue, you will see the details of the issue.
Secrets' Prioritization funnel view shows default CI/CD funnel.
The Compliance page provides a comprehensive view of all your project(s) compliance with Supported compliance standards.
If you have selected All projects or a subset of projects, you will see this general view.
You can see the compliance level of all the supported standards for the selected projects group. This charts will provide you with a high level view of the general coverage of checkpoints per standard.
Furthermore, you can see a list with all the projects together with it's respective compliance level for every standard.
Opening the Compliance page for a selected single project will display as below image.
This page will show statistics for every standard that the selected project has been assessed:
Overall view of passed/failed checkpoints
Checkpoints by result
A list of all the checkpoints together with its pass status
Clicking on icon of any checkpoint will open a slide with the details
A CI/CD misconfiguration in any element of the software pipeline, like a package manager, a build file, or a CI job, might open the door to attacks targeted at the organization’s DevOps chain.
The CI/CD misconfigurations Scanner is a tool that checks the configuration of the software project under analysis, and reports any misconfiguration currently active for the policy assigned to the project. Detected misconfigurations could be uploaded to Xygeni platform for consolidation and for enabling response actions.
Fixing a misconfiguration issue often require changes not only in a tool configuration, but also in the activities of the software development process. The detector documentation provides a Mitigation / Fix
section that describes the recommended actions.
For detecting CI/CD misconfigurations found in software project with sources in current directory, the command:
uploads the result to Xygeni platform.
For exporting the most important misconfigurations to CSV for review, or importing the findings into another tool:
The CI/CD Misconfigurations Scanner is launched using the xygeni misconf [options]
command.
For a full reference of all the available option, you can issue :
The most important properties are:
Name of the project, -n
or --name
.
Input, either a directory (-d|--dir
) or a repository (-repo|--repository
). If none given, the local current directory is assumed.
Upload results to the service, --upload
. By default, results are not uploaded.
Output file (-o
or --output
) and format (-f
or --format
). If not output file (or stdout / - are used), the standard output is used. Use --format=none
for no output.
The detectors to run could be tailored with the --detectors
/ --skip-detectors
options. A common use-case is to consider only issues with high or critical severity with --detectors=high
.
CI/CD scanner performs checks against your SCM and CI/ CD systems recover information about your repository and organization, as part of the scanning process to validate if there are misconfigurations affecting them.
For that, it is important to provide tokens with the permissions allowing the scanner to collect the data needed for analyses. If tokens are not provided, the scanner will not be able to assess your repository/organization.
The CI/CD Misconfigurations Scanner is configured in the YAML file conf/xygeni.misconfigurations.yml
.
Detectors are configured with different YAML files located under the conf/misconfigurations
directory of the xygeni scanner. There is a sample _template.yml_
file that could be used for creating your own detectors.
Please read the documentation on CI/CD misconfigurations detectors available.
Run a compliance assessment on the project in current directory, using Xygeni Scanner:
which produces an output similar to this:
You may now log in the Xygeni Dashboard and view the Compliance Assessment results.
Compliance Assessment checks compliance with Software Supply-Chain Security standards and guidelines.
A standard
is a list of checkpoints
, arranged in categories. A software project is compliant with a standard ("passes") only when all the standard’s required checkpoints passed.
The assessment report gives a status (PASS, PARTIAL, FAIL) and a compliance level between 0 (not compliant at all) and 10 (fully compliant).
See supported standards and guidelines for more details.
Remember that for a standard to pass, all its required checkpoints must pass.
A non-compliant checkpoint could be verified following its documented Verification
section, and made compliant by following the recommended actions in the Remediation
section.
A Compliance Assessment scan is launched using the compliance
command of the xygeni
executable.
With --help
the usage is displayed:
$XYGENI_HOME
denotes here the path where the Xygeni scanner is installed.
The Compliance Assessment Scanner is configured in the YAML file $XYGENI_HOME/conf/xygeni.compliance.yml
:
Standards are configured with different YAML files located under the $XYGENI_HOME/conf/compliance/standards
directory of the xygeni scanner. Each standard provides some information and the list of checkpoints that are to be checked for compliance assessment.
Checkpoints are configured with different YAML files located under the $XYGENI_HOME/conf/compliance/checkpoints
directory of the xygeni scanner.
You might use the Policy Administration tool for editing standards to be enforced at the organization.
This section presents common use-cases for evaluating compliance against a given supply-chain security standard across the software lifecycle.
There could be certain checkpoints that should not be run for a certain project, or because the practice enforced by the checkpoint does not fit with the organization policy. The list of checkpoints that should be active for a standard to enforce, according to the organization policy, could be set in the Policy page in Xygeni Administration.
Disabling checkpoints could be done, in order of prevalence: - by disabling the intended checkpoint(s), listing their IDs in the --skip-checkpoints
option. - with the runCheckpoints
/ skipCheckpoints
properties in the scanner YAML. - at the policy level, - by deactivating the checkpoint at the central configuration level (e.g. by setting enabled: false
in the checkpoint YAML configuration).
A common use case is to disable issues with info / low severity (--skip-checkpoints=low
) or equivalently enabling only high or critical issues (--checkpoints=high
).
a) Direct registering script as a git hook
To run Xygeni scanner at client-side, before a commit is applied, you may add a simple pre-commit
executable script like this (example for Linux and macOS):
The --fail-on
option is configured to make the build fail when at least one issue with critical or high severity is found (so the scanner acts as a security gate
).
For running the scan as an optional pipeline check, use --fail-on=never
instead.
This example is a similar security gatekeeper, but commits are allowed only when no scan of the given types has a critical issue (only the scanner execution is shown, for brevity):
When a critical issue is detected in any of the scans for secrets, misconfigurations or IaC flaws, the commit will be aborted.
Use compliance
command to limit the scope of the scan to compliance assessment.
b) Using pre-commit framework
There are some popular frameworks for improving the hook mechanism provided by Git, mainly aimed at sharing the scripts and simplifying the configuration when multiple actions need to be added for a git event.
One of the most popular frameworks is pre-commit
. The list of actions required are listed in a YAML file, and `pre-commit
manages the installation and execution of scripts written in any language.
Follow the instructions given in pre-commit quick start for installing the framework. Essentially you need python
and pip
, and run pip install pre-commit
in the node where the git commit
will be intercepted.
Then add the following entry to you .pre-commit-config.yaml
:
Or, for running the scanner Docker image:
Then install the git hook scripts using
Xygeni scanner will run before each commit. The configuration given above works for setting Xygeni as a security gate to avoid commits having critical security issues. To avoid break the builds, --fail-on=never
could be used instead.
Use compliance
command to limit the scope of the scan to compliance assessment.
You may use compliance results to block a commit.
Under GitHub, you may use Xygeni GitHub Action, running the compliance command only, and with fail_on
argument configured to fail the build only when important checkpoints do not pass:
The fail_on
is configured to make the build fail when at least one critical checkpoint do not pass. For having the compliance check as optional, use fail_on: never
instead.
A new standard may be created from existing standards by simply listing the new standard’s checkpoints in `$XYGENI_HOME/conf/compliance/standards/<my_new_standard>.yml:
Where ID_CHECKPOINT_1
, ID_CHECKPOINT_2
… are the checkpoint identifier. The configuration for each checkpoint is loaded from <custom-standards-dir>/<ID_CHECKPOINT>.yml
file, if available, or from a resource loaded from compliance/checkpoints/<ID_CHECKPOINT>.yml
path.
The easiest way to define your own standard is using the Policy Administration. This allows to mix-and-match checkpoints from different standards into a new one, possibly changing checkpoint severities and its _optional flag.
An alternative option is to create your standard’s my_standard.yml
file, located in a specific $XYGENI_HOME/conf/compliance/custom_standards
directory, testing it, and then upload the configuration using the central configuration.
Command-line example:
The CIS Software Supply Chain Security benchmark provides prescriptive guidance for establishing a secure configuration posture for Software Development Platforms and Pipelines.
CIS Benchmarks are best practices for the secure configuration of a target system. In this case, the target system is the software supply chain.
The Software Component Verification Standard (SCVS) is a community-driven effort to establish a framework for identifying activities, controls, and best practices, which can help in identifying and reducing risk in a software supply chain.
The OpenSSF FLOSS Best Practices is a set of recommendations from the Open Source Security Foundation (OpenSSF) Best Practices Working Group to help open source developers create and maintain more secure software.
The best practices criteria are divided into three levels, for an incremental adoption:
Passing focuses on best practices that well-run FLOSS projects typically already follow. Getting the passing badge is an achievement; at any one time only about 10% of projects pursuing a badge achieve the passing level.
Silver is a more stringent set of criteria than passing but is expected to be achievable by small and single-organization projects.
Gold is even more stringent than silver and includes criteria that are not achievable by small or single-organization projects.
OpenSSF Scorecards is an automated tool that assesses a number of important heuristics ("checks") associated with software security and assigns each check a score of 0-10. You can use these scores to understand specific areas to improve in order to strengthen the security posture of your project. You can also assess the risks that dependencies introduce, and make informed decisions about accepting these risks, evaluating alternative solutions, or working with the maintainers to make improvements.
The ESF Securing the Software Supply Chain - Recommended Practices for Developers is a set of guidelines aimed at improving the security of software development by reducing the risk of supply chain attacks.
The set of recommend principles are framed in 5 top-level sections:
Secure product criteria and management
Develop Secure Code
Verify Third-Party Components
Harden the Build Environment
Deliver Code
By following these guidelines, software developers can reduce the risk of supply chain attacks and ensure the security and integrity of their software.