OpenID-based security features added to GitHub Actions as usage doubles

Single-use tokens and reusable workflows explained at Universe event

GitHub Universe GitHub Actions have new security based on OpenID, along with the ability to create reusable workflows, while usage has nearly doubled year on year, according to presentations at the Universe event.

The Actions service was previewed three years ago at Universe 2018, and made generally available a year later. It was a huge feature, building automation into the GitHub platform for the first time (though rival GitLab already offered DevOps automation).

It require compute resources, called runners, which can be GitHub-hosted or self-hosted. Actions are commands that execute on runners. Jobs are a sequence of steps that can be Actions or shell commands. Workflows are a set of jobs which can run in parallel or sequentially, with dependencies. For example, that deployment cannot take place unless build and test is successful. Actions make it relatively easy to set up continuous integration or continuous delivery, particularly since they are cloud-hosted and even a free plan offers 2,000 automation minutes per month, and more than that for public repositories.

In order to deploy, or access resources such as databases for testing purposes, Actions need to authenticate against those resources. A common approach is to use encrypted environment variables but there are several hazards, such as secrets getting inadvertently logged in plain text, as well as the problem of credentials going out of date and having to be updated.

The solution is OIDC (OpenID Connect) tokens, which means requesting a one-time token from a cloud provider. Providers include AWS, Azure, Google Cloud Platform, and HashiCorp Vault. A step or Action in the workflow can request this token. Usage of OIDC is documented here with specific guides for the four providers mentioned above.

OpenID Connect architecture for GitHub Actions

OpenID Connect architecture for GitHub Actions

Another benefit of OIDC is that permissions can be made more granular by configuring conditions for issuing tokens. An example given in a Universe presentation by product manager Jennifer Schelkopf is that staging job can be configured without access to the production environment, which could be reserved for a second "deploy to production" job.

Another new feature in Actions is reusable workflows, currently in beta. The idea is to be able to call one workflow from another, as easily as using an Action with the uses statement. A reusable workflow has to specifically support being called in this way, via a workflow_call event which receives inputs including secrets from the calling workflow. The advantage is less use of "clipboard inheritance".

A simple reusable workflow

A simple reusable workflow

There are some limitations, like no nesting (a reusable workflow cannot call another reusable workflow). Environment variables are not propagated but would have to be passed as inputs. During the beta, the caller workflow cannot access the outputs from a called workflow, but this will be fixed for general availability. Documentation is here.

GitHub Actions usage has increased from 75 million jobs per month, reported at Universe 2020, to over 147 million jobs per month reported at the current event. In addition, the number of actions in the GitHub marketplace has increased from 6,200 a year ago to 10,431 at the time of writing. Any vendor who provides cloud services or tools benefits from providing Actions that make it easy to automate their use. A quick search reveals 300 AWS actions, for example (most unofficial), and 136 for Azure. There are also actions for things like Slack and Teams notifications, security scanning, and for numerous deployment platforms.

What else is coming for Actions? The first place to look is the GitHub roadmap, which shows to some degree what is on the way. One welcome planned feature is the ability to use Actions from internal repositories other than the one where the workflow is hosted. ®

Similar topics

Other stories you might like

  • Prisons transcribe private phone calls with inmates using speech-to-text AI

    Plus: A drug designed by machine learning algorithms to treat liver disease reaches human clinical trials and more

    In brief Prisons around the US are installing AI speech-to-text models to automatically transcribe conversations with inmates during their phone calls.

    A series of contracts and emails from eight different states revealed how Verus, an AI application developed by LEO Technologies and based on a speech-to-text system offered by Amazon, was used to eavesdrop on prisoners’ phone calls.

    In a sales pitch, LEO’s CEO James Sexton told officials working for a jail in Cook County, Illinois, that one of its customers in Calhoun County, Alabama, uses the software to protect prisons from getting sued, according to an investigation by the Thomson Reuters Foundation.

    Continue reading
  • Battlefield 2042: Please don't be the death knell of the franchise, please don't be the death knell of the franchise

    Another terrible launch, but DICE is already working on improvements

    The RPG Greetings, traveller, and welcome back to The Register Plays Games, our monthly gaming column. Since the last edition on New World, we hit level cap and the "endgame". Around this time, item duping exploits became rife and every attempt Amazon Games made to fix it just broke something else. The post-level 60 "watermark" system for gear drops is also infuriating and tedious, but not something we were able to address in the column. So bear these things in mind if you were ever tempted. On that note, it's time to look at another newly released shit show – Battlefield 2042.

    I wanted to love Battlefield 2042, I really did. After the bum note of the first-person shooter (FPS) franchise's return to Second World War theatres with Battlefield V (2018), I stupidly assumed the next entry from EA-owned Swedish developer DICE would be a return to form. I was wrong.

    The multiplayer military FPS market is dominated by two forces: Activision's Call of Duty (COD) series and EA's Battlefield. Fans of each franchise are loyal to the point of zealotry with little crossover between player bases. Here's where I stand: COD jumped the shark with Modern Warfare 2 in 2009. It's flip-flopped from WW2 to present-day combat and back again, tried sci-fi, and even the Battle Royale trend with the free-to-play Call of Duty: Warzone (2020), which has been thoroughly ruined by hackers and developer inaction.

    Continue reading
  • American diplomats' iPhones reportedly compromised by NSO Group intrusion software

    Reuters claims nine State Department employees outside the US had their devices hacked

    The Apple iPhones of at least nine US State Department officials were compromised by an unidentified entity using NSO Group's Pegasus spyware, according to a report published Friday by Reuters.

    NSO Group in an email to The Register said it has blocked an unnamed customers' access to its system upon receiving an inquiry about the incident but has yet to confirm whether its software was involved.

    "Once the inquiry was received, and before any investigation under our compliance policy, we have decided to immediately terminate relevant customers’ access to the system, due to the severity of the allegations," an NSO spokesperson told The Register in an email. "To this point, we haven’t received any information nor the phone numbers, nor any indication that NSO’s tools were used in this case."

    Continue reading

Biting the hand that feeds IT © 1998–2021