Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@factorialco/gat
Advanced tools
The gat
project is a tool to write your GitHub Actions workflows using TypeScript.
Maintaining YAML files is hard and if your project is big enough you will find yourself duplicating a lot of code between your workflows. With gat
you can create reusable jobs and steps just using TypeScript objects and importing them in your workflow templates.
Why gat
? The name is an acronym of "GitHub Actions Template Generator" without the last part because gat
means "cat" in Catalan.
Install the main package and its dependencies using the following command:
npm i -D @factorialco/gat typescript tsx commander @swc/core
The gat
CLI assumes that you have a index.ts
file inside .github/templates
. Let's create our first template:
// .github/templates/index.ts
import { Workflow } from "@factorialco/gat";
new Workflow("My first workflow")
.on("push")
.addJob("test", {
steps: [
{
uses: "actions/checkout@v3",
},
{
uses: "actions/setup-node@v3",
},
{
run: "npm test",
},
],
})
.compile("my-first-workflow.yml");
Notice that you need to call the compile()
method at the end, passing the file name of the generated Github Actions workflow.
You can build your templates running this command in your root folder:
npx gat build
Following the previous example, you should see now a file .github/workflows/my-first-workflow.yml
like this:
# Workflow automatically generated by gat
# DO NOT CHANGE THIS FILE MANUALLY
name: My first workflow
on:
push: null
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm test
Notice that the job includes a few assumptions like the runs-on
and timeout-minutes
fields. You can change those when adding a new job.
TODO
TODO
MIT
FAQs
Write your GitHub Actions workflows using TypeScript
We found that @factorialco/gat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.