Code Signing for Secure DevOps and DevSecOps: Centralized Management and Automation

Secure Code Signing for DevOps and DevSecOps

Today’s fast-paced digital landscape requires quick actions and top-notch safeguarding. Code signing is crucial in providing that security, but teams must approach the process effectively.

Unfortunately, managing digital certificates, a vital component of code signing, often becomes complex and error-prone for organizations, leading to potential risks and vulnerabilities.

Understanding Continuous Code Signing for DevSecOps

In the domain of DevOps, DevSecOps plays a critical role in ensuring security within the software development and engineering processes. It is responsible for defining and implementing corporate security policies, encompassing various aspects such as code signing, data privacy, and software supply chain management.

By integrating security into every development lifecycle stage, DevSecOps aims to mitigate risks and protect systems and data from potential threats.

How do DevOps and DevSecOps Teams Provide Security?

Manual certificate management by siloed teams often bypasses essential Public Key Infrastructure (PKI) standards mandated by the organization.

DevOps and DevSecOps teams, faced with the complexities of their pipelines, may resort to issuing certificates from untrusted sources and storing them insecurely to expedite the build and deployment stages of their CI/CD workflows.

Using insecure cryptographic methods compromises the application’s security and exposes organizations to avoidable risks. To address these challenges, it is crucial to centralize and automate code signing using cryptographic hardware.

By streamlining the management of code signing in DevOps and DevSecOps pipelines, teams can enhance security while maintaining efficiency.

In this article, we will explore the process of hardened code signing and provide insights on integrating and streamlining it within DevOps and DevSecOps practices effectively.

HSM: Securing Digital Keys

HSM, an acronym for Hardware Security Module, is a physical computing device designed to protect and manage digital keys. These devices offer robust security measures to safeguard sensitive cryptographic materials, such as private keys, ensuring their confidentiality and integrity.

HSMs provide a secure environment for key generation, storage, and cryptographic operations, making them vital components in various security architectures.

Get Code Signing Quickly Step-by-step

Following a streamlined process for hardened code signing is crucial to ensure the security and integrity of your distributed code. By implementing the following four steps, you can enhance security while minimizing risks and improving efficiency:

First Step of Generating Secure Public-Private Key Pair

Begin with an unsigned executable that is prepared for distribution. To securely sign the code, the code publisher must generate a reliable public-private keypair pair. FIPS 140-2 Level 3 validated HSM for generating code-signing keys guarantees the highest level of security and integrity.

Submit Public Key and Certificate Signing Request (CSR) to a Trusted Certificate Authority (CA).

Using the key pair generated earlier, create a Certificate Signing Request (CSR) containing essential information such as the publisher’s identity, signature algorithm, and digital signature.

Download PDF: User Guide for Code Signing Order and Enrollment Process

Submit this CSR to a trusted issuing certificate authority (CA). The CA will authenticate the CSR, ensuring that it has been digitally signed by the publisher, and will issue the code signing certificate.

NOTE: In some cases, organizations, particularly those involved in IoT device manufacturing, may choose to act as their own Issuing CA.

How to Verify Publisher Identity and Authenticate the CSR?

  1. The Issuing CA notifies the code publisher’s identity and authenticates the CSR.
  2. This step ensures that the publisher is legitimate and has been appropriately signed.
  3. Upon successful verification and authentication, the Issuing CA combines the publisher’s identity with the public key and signs the package, recreating a code-signing certificate.
  4. Once the code-signing certificate is ready, it is essential to determine the level of security required before signing and deploying any executables.
  5. Storing code-signing keys on a local machine or server is highly insecure and can lead to significant problems, such as compromised or stolen keys.
  6. It imports and stores code-signing certificates in a Key Management Server (KMS) to mitigate these risks.

A  KMS provides a FIPS 140-2 Level tamper-resistant physical boundary for secure storage:

  • AddiAnanced KMS with robust cryptographic features can auto also mate the entire code-signing and certificate management life cycle.
  • This allows DevOps and DevSecOps teams to seamlessly meet best practices, eliminate manual workflow bottlenecks, and integrate smoothly with CI/CD systems.
  • By reducing the time spent generating and managing digital certificates, teams can achieve faster code deployments and increase overall productivity.

By following these four steps and leveraging the capabilities of a reliable KMS, you can securely streamline the code signing process in your DevOps and DevSecOps pipelines.

Exploring Key Sharing Practices

Key Sharing is a practice that involves the storage and usage of the duplicate signing keys among members of a development organization.

While it may seem convenient for quick access and streamlined processes, this practice introduces significant security risks. Sharing signing keys amplifies the potential for key theft, misuse, and unauthorized access, expanding the threat landscape.

In the event of lost or stolen private keys, the productivity of team members may be impacted as they must divert their attention to remediation efforts.

Additionally, key sharing can lead to a loss of trust in older application versions, resulting in decreased user confidence and potential disruption.

Recommended: Top Best Practices for Storing X.509 Private Keys

PKCS#11: Standard and API for Cryptographic Tokens

PKCS#11 encompasses both a standard and an application programming interface (API) used to interact with cryptographic tokens.

The standard defines the interface for cryptographic tokens, including hardware security modules (HSMs) and smart cards. It establishes the rules and protocols for managing these tokens and the cryptographic operations they support.

The associated API defines common cryptographic object types, such as X.509 certificates, and the functions necessary for creating, modifying, using, and deleting these objects.

Integration of Code Signing Technologies for Seamless Workflow

Key Management Servers (KMS) and Hardware Security Modules (HSM) offer seamless integration with popular code-signing technologies to streamline the code-signing process and bolster security measures.

Recommended: Roadmap to Secure Code Signing to Safeguard the Digital World

These cryptographic devices ensure hardened key storage and enable organizations to perform essential tasks, including publisher identity validation and code integrity verification. Let’s explore the various integration possibilities and their impact on DevOps and DevSecOps pipelines.

For organizations leveraging Microsoft Authenticode with SignTool.exe, direct integration with a KMS that provides comprehensive certificate management functionality is readily available.

This integration empowers teams to manage code signing efficiently while ensuring robust security measures. Similarly, other code-signing technologies like Java Jar Signer, RPM (Red Hat), Docker, and diverse IoT implementations can integrate with KMS and HSM solutions, expanding their capabilities and compatibility.

Name of ProductValidation NeedsIssuance TimeOur Price
Windows Code SigningBusiness/Individual1-5 Days$199.99/yr
Apple Code SigningBusiness/Individual1-5 Days$199.99/yr
Java Code Signing Business/Individual1-5 Days$199.99/yr
Adobe Code SigningBusiness/Individual1-5 Days$199.99/yr
Authenticode SigningBusiness/Individual1-5 Days$199.99/yr
Visual Studio Code SigningBusiness/Individual1-5 Days$199.99/yr
Enterprise Code SigningBusiness/Individual1-5 Days$199.99/yr

Forward-thinking organizations are exploring avenues to deploy advanced code-signing workflows that go beyond the limitations of standard operating systems and runtime software development kits (SDKs).

They seek tighter integration with CI/CD systems, enabling a more comprehensive and tailored approach to code signing.

Integrating HSMs into their DevOps and DevSecOps pipelines, organizations experience a twofold benefit. Firstly, workflow efficiency is significantly improved as code signing seamlessly integrates into the development and deployment processes.

Secondly, the presence of HSMs supports additional cryptographic operations across the entire organization, reinforcing overall security measures.

Recommended: What are SafeNet Luna Network HSM 7 and Thales Luna Network HSM 7?

Embracing the integration of code-signing technologies with KMS and HSM solutions allows organizations to strengthen security, streamline workflows, and ensure the integrity of their code.

By leveraging these innovative integrations, DevOps and DevSecOps teams can achieve efficient code signing practices while meeting the evolving demands of modern software development and deployment processes.

KSP: Secure Key Storage Provider

KSP, short for Key Storage Provider, is a specialized service that focuses on securely storing and retrieving private keys. It provides a dedicated environment for key management, offering safeguards against unauthorized access and ensuring the confidentiality and integrity of stored keys. KSPs play a crucial role in protecting valuable cryptographic assets and preventing key theft or misuse.

Recommended: Code Sign With Azure DevOps Using a Code Signing Certificate Stored Within Azure Key Vault

Efficient Integration with Automating Code Signing for Enhanced Security

In continuous integration (CI), leveraging a Hardware Security Module (HSM) for secure key generation and certificate storage offers invaluable advantages. By integrating code signing into the CI/CD process, DevOps and DevSecOps teams can significantly reduce manual efforts and streamline their workflows for code builds.

The ideal CI/CD workflow for signing incorporates a system that manages the build and signing requests, a centralized key management server that ensures secure storage of code-signing keys and performs the signing process, and an approval entity that governs the authorized code signing procedure.

Implementing such a system, reinforced by a FIPS 140-2 Level 3-validated HSM, opens the door to automation. Rather than relying on manual intervention, code signing becomes an inherent part of the code development and release workflow.

This automation eliminates potential human errors and ensures consistent and reliable code signing throughout the development lifecycle.

Hash Signing: Enhancing Security and Efficiency

In certain signing scenarios, the traditional approach requires the entire source file to be uploaded for processing and signing. However, with hash signing, only the hash value of the source file is sent to the signing service.

Recommended: MD5 vs SHA1 vs SHA2 vs SHA3 – Compare Hashing Algorithms

This eliminates the need to transmit the entire file, reducing network latency and optimizing the signing process. Moreover, hash signing enhances security by ensuring that the source code remains within the secure development environment, minimizing the risk of unauthorized access or tampering during transmission.


Adopt these streamlined approaches to experience improved efficiency, reduced labor-intensive tasks, and increased security. Incorporating code signing within CI/CD processes, coupled with the robust capabilities of a validated HSM, paves the way for seamless automation, ensuring code integrity and reliable deployments.

Code Signing Process

Secure DevOps Process with Code Signing

Modernize and Secure Code Signing Process and Key Storage with DevOps and DevSecOps.

Janki Mehta

Janki Mehta

Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.

Leave a comment

Your email address will not be published. Required fields are marked *