cbs-consulting/cds-guard
v0.1.1Apache-2.0
Sets up @cbs-consulting/cds-guard in CAP and UI5 projects and keeps coding agents from changing protected CDS entities, annotations, code blocks and files by accident.
Changelog
What changed in each release of cds-guard, newest first. Add your change under "Unreleased" in the same pull request. To release, raise the version and rename "Unreleased" to that version and the date.
Unreleased
- New agent skill for AI coding agents such as Claude Code.
cds-guard skill --writeputs it in.claude/skills/cds-guard/SKILL.md(or another folder). It tells the agent how to set up the guard, to check whether a file is protected before editing it, to runcheckafterwards, and to lock only changes the user asked for. - The repository is now an agent plugin (
plugin.jsonand.claude-plugin/plugin.json), so the skill installs from the cbs Agentic Marketplace with/plugin install cds-guard@cbs-consultingin Claude Code, and the same way in GitHub Copilot CLI and Codex. - New
examples/folder with a complete configuration for GitHub, GitLab, Bitbucket Cloud and Azure DevOps. Each one shows other kinds of rules and how the platform names users, groups, teams and roles as approvers. checknow fails when a generated CODEOWNERS block or.guard/azure-policies.shno longer matchesprotected.yml, so a changed approver list can't be forgotten. After upgrading, runcds-guard codeowners --writeonce: the block now also gives the guard owners the CODEOWNERS file itself.cds-guard codeowners --checkruns only this comparison.check --base REFshows how each changed item looked at a git ref, as a short diff under the finding. The GitHub Action and the CI templates pass the pull request's target branch.check --format githuband--format azuremark each finding on its file and line in the pull request, and--codequality FILEwrites a GitLab Code Quality report. The GitHub Action, the Azure Pipelines template and the GitLab template use them.locklists what changed in each lock file and leaves lock files without changes untouched.codeowners --platform bitbucket --writewrites.bitbucket/CODEOWNERS, where Bitbucket reads it. An existingCODEOWNERSin the repository root is still checked.- The Azure DevOps policy script replaces the policies of earlier runs, so it can run again after approvers change.
- Each release moves the
v0tag thatuses: cbs-consulting/cds-guard@v0points at. - There is no Docker image any more. CI systems without Node.js run
npx @cbs-consulting/cds-guard checkin anode:22container, afternpm ciso the project's own@sap/cdsis used.
0.1.1 - 2026-11-11
- The package is now published from the release workflow, with npm provenance that links each version to the commit and workflow run that built it.
0.1.0 - 2026-11-11
- Published on npm as
@cbs-consulting/cds-guard; the command stayscds-guard. - First version.
cds-guard checkfails a pipeline when a protected CDS entity, element or annotation, a code block between@protected-beginand@protected-end, a file or a value in a JSON file changes without its lock file being updated. cds-guard lockwrites one lock file per rule to.guard/locks/. Changing a protected item means updating its lock file, and the lock file needs approval from the rule's approvers.cds-guard codeownerswrites those approvers to CODEOWNERS for GitHub, GitLab and Bitbucket, or printsaz repos policycommands for Azure DevOps.cds-guard initcreates.guard/protected.yml, andcds-guard listshows every protected item.check --format jsonand--format junitfor pipelines that show test results.- Ready-made CI steps for GitHub Actions, Azure Pipelines, Bitbucket Pipelines and GitLab CI.
- Works the same on Windows, macOS and Linux: messages show paths with
/, and line endings do not change hashes.