Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ updates:
directory: /
schedule:
interval: weekly
groups:
codeql:
patterns: ['github/codeql-action/*']
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066
- uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea
with:
languages: javascript-typescript
build-mode: none
- uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066
- uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ pnpm quality

Quality is the complete pre-push gate and never publishes, creates tags/releases, contacts GitHub Packages/SAP/Sandbox, or modifies consumers. Tarball tests use temporary installed ESM consumers, compile declarations and remove temporary directories. Keep every package above 95% statements, branches, functions and lines. Review error, credential, URL and mutation safety branches carefully.

Keep all CodeQL sub-actions pinned to the same commit. The dedicated Dependabot group updates them together; preserve this grouping when editing automation dependencies.

Changes to public exports require compatibility/type tests and selected-package changelog notes. Preserve schema v1 semantics and additive compatibility. If changing the canonical schema JSON, regenerate the embedded schema module and verify parity; document a deliberate compatibility decision before any expansion. Update synthetic fixtures and baseline provenance when consumers advance. Never copy a full Action into a harness.

Use synthetic values only: no real secrets, subscriptions, customer names or live SAP calls. Keep generated dist, coverage, tarballs, local auth and IDE files out of commits. Inspect staged files and run `git diff --check` before each commit. Publication is a separate manual owner workflow; no automatic publishing or consumer migration belongs in foundation changes.
16 changes: 16 additions & 0 deletions compatibility/tests/workflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ it('CI is read-only and never publishes', () => {
expect(Object.keys(ci.on)).toEqual(['pull_request', 'push', 'workflow_dispatch']);
expect(JSON.stringify(ci)).not.toMatch(/packages.*write|npm publish/);
});
it('keeps CodeQL steps on one version and groups their Dependabot updates', () => {
const codeqlActions = workflow('codeql')
.jobs.analyze.steps.map((step: { uses?: string }) => step.uses)
.filter(
(action: string | undefined): action is string =>
action !== undefined && action.startsWith('github/codeql-action/'),
);
expect(codeqlActions.length).toBeGreaterThan(1);
expect(new Set(codeqlActions.map((action: string) => action.split('@')[1])).size).toBe(1);

const dependabot = parse(readFileSync('.github/dependabot.yml', 'utf8'));
const actionsUpdates = dependabot.updates.find(
(update: { 'package-ecosystem': string }) => update['package-ecosystem'] === 'github-actions',
);
expect(actionsUpdates.groups.codeql.patterns).toEqual(['github/codeql-action/*']);
});
for (const name of ['reserve-package-names', 'publish-package', 'create-package-release'])
it(name + ' is manually guarded with least permissions', () => {
const w = workflow(name);
Expand Down
Loading