Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions .github/workflows/update-actions.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DependencyType, ReleasableCommits, cdk, github, javascript } from 'projen';
import { JobPermission } from 'projen/lib/github/workflows-model';
import { GitHubAssignApprover } from './src/assign-approver';
import { UpdateActionsWorkflow } from './src/security';

const project = new cdk.JsiiProject({
author: 'The Open Construct Foundation',
Expand All @@ -20,6 +21,7 @@ const project = new cdk.JsiiProject({
'constructs',
'fs-extra',
'@types/fs-extra',
'tsx',
],
deps: [
'commit-and-tag-version',
Expand Down Expand Up @@ -51,6 +53,7 @@ const project = new cdk.JsiiProject({
bin: {
'pipelines-release': 'lib/release.js',
'detect-drift': 'lib/drift/detect-drift.js',
'update-github-actions': 'lib/security/update-github-actions.js',
},
releaseToNpm: true,
npmTrustedPublishing: true,
Expand Down Expand Up @@ -135,4 +138,17 @@ new GitHubAssignApprover(project, {
defaultApprovers: ['hoegertn', 'Lock128'],
});

// Weekly maintenance: scan TypeScript source for `uses:` action references,
// pin them to the latest stable release's commit SHA, and open a PR with the
// result. Keeps generated pipelines on current, security-patched actions
// despite them living as string literals (invisible to Dependabot/Renovate).
// This package self-hosts the script from source so the workflow can run
// before the `update-github-actions` bin is installed into node_modules, and
// it extends the default paths with `src` because projen-pipelines embeds
// action strings in its hand-authored library code.
new UpdateActionsWorkflow(project, {
paths: ['src', '.projen', '.projenrc.ts'],
command: 'npx tsx src/security/update-github-actions.ts',
});

project.synth();
Loading
Loading