use-github-actions-for-validated-builds

GitHub Actions provide a very simple way for GitOps pipelines as you don’t need an additional CI/CD tool. You could simply create or use an existing GitHub actions and configure it to run whenever a specific branch is updated.

You can make sure, that every build (i. e. a container image) can be validated in the most secure way, CodeNotary notarization is mandatory.

Let’s walk through the simple steps to integrate CodeNotary:

Create GitHub secrets

You can start by adding GitHub secrets for Dockerhub and CodeNotary in your repository.

If you have no free CodeNotary account yet to setup the notarization process, start with that:

CodeNotary Sign Up

Create your workflow

GitHub Actions are defined using workflows that can either be created as files in your repository under .github/workflows or using the UI and the Actions menu.

The workflow

The following workflow will be triggered whenever a new commit in the master branch is detected, builds a container image, notarizes the image and pushes it to Dockerhub.com.

Please make sure to replace the Container Image Path with your account repository.

GitHub Actions yml

# Define when the Actions should be triggered
on:
  push:
    branches:
      - master
    tags:
      - "**"
# Name of the Workflow
name: "Continuous Deployment"

# Different Jobs
jobs:
  build:
    name: "Build and deploy"
    runs-on: ubuntu-latest # Define the build docker image

    env:
      DOCKER_IMAGE: dzlabsch/build-notarize-docker-action # define Docker Repo

    steps:
# Checkout the Git repo
      - name: "Checkout"
        uses: actions/checkout@v1.0.0  

# Build the container image as latest
      - name: "Build Docker image"
        run: $(which docker) build --tag ${DOCKER_IMAGE}:latest .

# Download and verify CodeNotary vcn
      - name: "Download vcn"
        run: |
             curl -L -o /tmp/vcn https://github.com/vchain-us/vcn/releases/download/v0.7.3/vcn-v0.7.3-linux-amd64-static
             CHECKSUM=$(sha256sum /tmp/vcn | cut -d " " -f 1)
             echo $CHECKSUM
             curl -s https://api.codenotary.io/authenticate/$CHECKSUM?org=vchain.us | grep -q :0
             chmod +x /tmp/vcn

# Notarize the container image using your GitHub secrets
      - name: "Notarize Docker Image"
        run: |
             VCN_USER=${{ secrets.CODENOTARY_USER }}  VCN_PASSWORD=${{ secrets.CODENOTARY_PASS }} /tmp/vcn login
             VCN_NOTARIZATION_PASSWORD=${{ secrets.CODENOTARY_PASS }} /tmp/vcn n -p --attr GitHub="${GITHUB_SHA:0:7}" docker://${DOCKER_IMAGE}:latest 

# Log into Dockerhub or your container registry
      - name: "Docker Login"
        if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')"
        run: echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ secrets.DOCKER_USERNAME }}

# Push the container image to the container repository
      - name: "Push Docker image (latest)"
        if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')"
        run: $(which docker) push ${DOCKER_IMAGE}:latest

# Logout Docker registry
      - name: "Docker Logout"
        if: "'refs/heads/master' == github.ref || startsWith(github.ref, 'refs/tags/')"
        run: $(which docker) logout

Check the Workflow

When you commit the next changes to the master branch the GitHub action workflow should automatically be triggered.

successful GitHub Action workflow

When you click the title of the workflow, you can also check the details of the different steps.

GitHub Action job overview

and you can open each job individual to check the details:

CodeNotary Notary action

Authenticate the container image

Everyone downloading and using that notarized container image can check the authenticity of it using CodeNotary vcn (vcn authenticate docker://image).

It could also be easily integrated in your deployment process as well.

CNIL
Metrics and Logs

(formerly, Opvizor Performance Analyzer)

VMware vSphere & Cloud
PERFORMANCE MONITORING, LOG ANALYSIS, LICENSE COMPLIANCE!

Monitor and Analyze Performance and Log files:
Performance monitoring for your systems and applications with log analysis (tamperproof using immudb) and license compliance (RedHat, Oracle, SAP and more) in one virtual appliance!

Subscribe to Our Newsletter

Get the latest product updates, company news, and special offers delivered right to your inbox.

Subscribe to our newsletter

Use Case - Tamper-resistant Clinical Trials

Goal:

Blockchain PoCs were unsuccessful due to complexity and lack of developers.

Still the goal of data immutability as well as client verification is a crucial. Furthermore, the system needs to be easy to use and operate (allowing backup, maintenance windows aso.).

Implementation:

immudb is running in different datacenters across the globe. All clinical trial information is stored in immudb either as transactions or the pdf documents as a whole.

Having that single source of truth with versioned, timestamped, and cryptographically verifiable records, enables a whole new way of transparency and trust.

Use Case - Finance

Goal:

Store the source data, the decision and the rule base for financial support from governments timestamped, verifiable.

A very important functionality is the ability to compare the historic decision (based on the past rulebase) with the rulebase at a different date. Fully cryptographic verifiable Time Travel queries are required to be able to achieve that comparison.

Implementation:

While the source data, rulebase and the documented decision are stored in verifiable Blobs in immudb, the transaction is stored using the relational layer of immudb.

That allows the use of immudb’s time travel capabilities to retrieve verified historic data and recalculate with the most recent rulebase.

Use Case - eCommerce and NFT marketplace

Goal:

No matter if it’s an eCommerce platform or NFT marketplace, the goals are similar:

  • High amount of transactions (potentially millions a second)
  • Ability to read and write multiple records within one transaction
  • prevent overwrite or updates on transactions
  • comply with regulations (PCI, GDPR, …)


Implementation:

immudb is typically scaled out using Hyperscaler (i. e. AWS, Google Cloud, Microsoft Azure) distributed across the Globe. Auditors are also distributed to track the verification proof over time. Additionally, the shop or marketplace applications store immudb cryptographic state information. That high level of integrity and tamper-evidence while maintaining a very high transaction speed is key for companies to chose immudb.

Use Case - IoT Sensor Data

Goal:

IoT sensor data received by devices collecting environment data needs to be stored locally in a cryptographically verifiable manner until the data is transferred to a central datacenter. The data integrity needs to be verifiable at any given point in time and while in transit.

Implementation:

immudb runs embedded on the IoT device itself and is consistently audited by external probes. The data transfer to audit is minimal and works even with minimum bandwidth and unreliable connections.

Whenever the IoT devices are connected to a high bandwidth, the data transfer happens to a data center (large immudb deployment) and the source and destination date integrity is fully verified.

Use Case - DevOps Evidence

Goal:

CI/CD and application build logs need to be stored auditable and tamper-evident.
A very high Performance is required as the system should not slow down any build process.
Scalability is key as billions of artifacts are expected within the next years.
Next to a possibility of integrity validation, data needs to be retrievable by pipeline job id or digital asset checksum.

Implementation:

As part of the CI/CD audit functionality, data is stored within immudb using the Key/Value functionality. Key is either the CI/CD job id (i. e. Jenkins or GitLab) or the checksum of the resulting build or container image.

White Paper — Registration

We will also send you the research paper
via email.

CodeNotary — Webinar

White Paper — Registration

Please let us know where we can send the whitepaper on CodeNotary Trusted Software Supply Chain. 

Become a partner

Start Your Trial

Please enter contact information to receive an email with the virtual appliance download instructions.

Start Free Trial

Please enter contact information to receive an email with the free trial details.