stack-sentinel
Know when a project's stack goes out of support, before it breaks.
npm License Node.js Dependencies
stack-sentinel scans a project for outdated or unsupported versions of UI5, Node.js, Cloud Foundry runtimes and CAP, checks its npm packages for known vulnerabilities, and reports the findings to Microsoft Teams or any JSON endpoint. It is built to run on a schedule, so projects with no new commits are still monitored, and nobody has to remember to look.
No dependencies; needs Node.js 22 or newer.
π Quick start
npx @cbs-consulting/stack-sentinel@latest <path-to-project>
# notify a Teams channel when there is at least a warning
SENTINEL_WEBHOOK_URL=https://... npx @cbs-consulting/stack-sentinel@latest . --project "Customer A / Orders app"
# send the raw JSON report to a customer-owned endpoint instead
npx @cbs-consulting/stack-sentinel@latest . --webhook https://customer.example/hooks/sentinel --format json
To use it often, install it once with npm install -g @cbs-consulting/stack-sentinel
and run stack-sentinel instead.
Run stack-sentinel --help for the flags and see Settings for
everything that can be changed. Exit code is 1 when a finding
reaches --fail-on (default error), 2 when the tool itself fails.
To run it every week in a project's pipeline, copy one of the examples and set the webhook address as a secret. Nothing in the file has to be edited.
π Checks
| Check | What it reports | Compared against |
|---|---|---|
ui5-version | UI5 versions out of maintenance, not long-term maintenance, or removed from the CDN | SAP's UI5 version overview |
node-version | Node.js versions past or near end of life | Node.js release schedule |
cf-node-version | Node.js apps on Cloud Foundry asking for a version the buildpack no longer ships | Cloud Foundry Node.js buildpack |
cap-version | CAP packages on a major version SAP no longer supports | npm registry |
npm-audit | Installed npm packages with known vulnerabilities | npm audit service |
license | Installed npm packages whose license the policy does not allow, such as strong copyleft | license.deny and license.allow |
Every finding has a severity (error, warn, info or ok), and those that
call for a change say what to change, for example "Set framework.version to
1.148.12". docs/CHECKS.md describes where each check looks
and when it reports what.
By default every check runs; stack-sentinel --list-checks prints their ids.
Use the checks setting to run only some, or skipChecks to leave some out
(see Settings for the flag, environment variable and config key).
An unknown id, or a selection that leaves nothing to run, stops the run with
exit code 2. The report lists the checks that ran and the ones skipped.
βοΈ Settings
Nothing about the scanned project's layout or the network is fixed: every value below has a default and can be overridden. Precedence, highest first:
- command-line flag
- environment variable
- config file:
sentinel.config.jsonin the scanned project, or the file named by--config/SENTINEL_CONFIG - shared config, if one is set (see Shared config)
- default
An empty environment variable counts as not set, and so does an unexpanded
Azure DevOps variable such as $(NAME). An invalid value stops the
run with exit code 2. stack-sentinel --show-config prints every setting,
its value and where it came from.
| Config key | Flag | Environment variable | Default | Meaning |
|---|---|---|---|---|
project | --project | SENTINEL_PROJECT | Name shown in reports (default: name of the scanned folder) | |
checks | --checks | SENTINEL_CHECKS | Run only these checks | |
skipChecks | --skip-checks | SENTINEL_SKIP_CHECKS | (none) | Run all checks except these |
output | --output | SENTINEL_OUTPUT | Write the JSON report to this file | |
webhook | --webhook | SENTINEL_WEBHOOK_URL | URL the report is posted to (not read from the config file, because it is a credential) | |
heartbeat | --heartbeat | SENTINEL_HEARTBEAT_URL | URL that gets a short status message after every completed run (not read from the config file) | |
heartbeatMethod | SENTINEL_HEARTBEAT_METHOD | POST | How the heartbeat is sent; GET carries no status message, for services that only accept GET: POST, GET | |
runUrl | --run-url | SENTINEL_RUN_URL | Link to this pipeline run, shown on the card (default: detected on GitHub Actions and Azure DevOps) | |
repositoryUrl | --repository-url | SENTINEL_REPOSITORY_URL | Link to the scanned repository, shown on the card (default: detected on GitHub Actions and Azure DevOps) | |
format | --format | SENTINEL_FORMAT | teams | Webhook payload: teams, json |
notifyOn | --notify-on | SENTINEL_NOTIFY_ON | warn | Notify at or above this severity: ok, info, warn, error |
failOn | --fail-on | SENTINEL_FAIL_ON | error | Exit 1 at or above this severity: ok, info, warn, error, never |
timeoutSeconds | --timeout | SENTINEL_TIMEOUT_SECONDS | 30 | Timeout for each HTTP request |
scan.exclude | --exclude | SENTINEL_SCAN_EXCLUDE | node_modules,.git,dist,build,gen,coverage,.cache | Folder names that are not scanned (replaces the default list) |
scan.maxDepth | --max-depth | SENTINEL_SCAN_MAX_DEPTH | 8 | How many folder levels deep to scan |
notify.maxFindings | SENTINEL_NOTIFY_MAX_FINDINGS | 25 | Most findings listed in one Teams card | |
minReleaseAgeDays | SENTINEL_MIN_RELEASE_AGE_DAYS | 0 | Recommend and move to UI5 patches and npm packages only once they were published this many days ago; 0 turns it off (see Fix pull requests) | |
dashboard.enabled | SENTINEL_DASHBOARD_ENABLED | false | Keep one issue (GitHub) or work item (Azure DevOps) up to date with the latest report, open fix pull requests and ignored findings (see Dashboard) | |
dashboard.title | SENTINEL_DASHBOARD_TITLE | stack-sentinel: {project} | Title of the dashboard ({project} is the project name) | |
dashboard.label | SENTINEL_DASHBOARD_LABEL | stack-sentinel | Label (GitHub) or tag (Azure DevOps) the dashboard is found by | |
dashboard.workItemType | SENTINEL_DASHBOARD_WORK_ITEM_TYPE | Task | Azure DevOps: the work item type of the dashboard | |
fix.mode | --fix | SENTINEL_FIX_MODE | off | Fix what can be fixed safely: apply changes the scanned files, pr opens a pull request per kind of fix (see Fix pull requests): off, apply, pr |
fix.groups | --fix-groups | SENTINEL_FIX_GROUPS | ui5,node,npm-overrides | Kinds of fix to make, one pull request each: ui5 (UI5 versions), node (Node.js versions), npm-overrides (npm overrides no longer needed); and, off by default, cap (CAP major upgrades, as draft pull requests) and npm-audit (vulnerable npm packages; runs npm) |
fix.on | --fix-on | SENTINEL_FIX_ON | info | Fix findings at or above this severity: ok, info, warn, error |
fix.token | SENTINEL_FIX_TOKEN | Token that opens the pull requests (default: GITHUB_TOKEN or SYSTEM_ACCESSTOKEN; not read from the config file) | ||
fix.autoMerge | SENTINEL_FIX_AUTO_MERGE | off | Let fix pull requests merge by themselves once their checks pass: patch for those that only move to a newer patch of the same version, all for every one: off, patch, all | |
fix.branchPrefix | SENTINEL_FIX_BRANCH_PREFIX | stack-sentinel/ | Start of the branch names of fix pull requests | |
fix.maxPullRequests | SENTINEL_FIX_MAX_PULL_REQUESTS | 5 | Most fix pull requests open at the same time | |
ui5.feed | SENTINEL_UI5_FEED | https://ui5.sap.com/versionoverview.json | Version overview feed: a URL, or a path to a downloaded copy | |
ui5.requireLts | SENTINEL_UI5_REQUIRE_LTS | true | Warn about versions that are not long-term maintenance | |
ui5.warnDays | SENTINEL_UI5_WARN_DAYS | 180 | Warn this many days before an end date | |
ui5.maintenanceDate | SENTINEL_UI5_MAINTENANCE_DATE | eomm | End-of-maintenance date to use: eomm is the SAP BTP date shown on the version overview page, eom the feed's second date: eomm, eom, earliest | |
ui5.versionInfoUrl | SENTINEL_UI5_VERSION_INFO_URL | https://ui5.sap.com/{version}/resources/sap-ui-version.json | Where the build date of a UI5 patch is read, for minReleaseAgeDays ({version} is replaced) | |
ui5.cdnHosts | SENTINEL_UI5_CDN_HOSTS | ui5.sap.com,sapui5.hana.ondemand.com,openui5.hana.ondemand.com,sdk.openui5.org | Hosts recognised in bootstrap URLs (replaces the default list) | |
ui5.yamlPattern | SENTINEL_UI5_YAML_PATTERN | (^|/)ui5([-.][\w.-]+)?\.ya?ml$ | Files read as UI5 tooling config (regex on the relative path) | |
ui5.htmlPattern | SENTINEL_UI5_HTML_PATTERN | \.html?$ | Files searched for a bootstrap URL (regex on the relative path) | |
ui5.testPagePattern | SENTINEL_UI5_TEST_PAGE_PATTERN | \.qunit\.html?$ | HTML files treated as local test pages, reported as info at most (regex on the relative path) | |
ui5.testPageContent | SENTINEL_UI5_TEST_PAGE_CONTENT | sap/ushell/bootstrap/sandbox\d*\.js | HTML files containing this are treated as local test pages, e.g. a launchpad sandbox (regex on the file content) | |
ui5.manifestPattern | SENTINEL_UI5_MANIFEST_PATTERN | (^|/)manifest\.json$ | Files read as app manifests (regex on the relative path) | |
node.feed | SENTINEL_NODE_FEED | https://raw.githubusercontent.com/nodejs/Release/main/schedule.json | Node.js release schedule: a URL, or a path to a downloaded copy | |
node.requireLts | SENTINEL_NODE_REQUIRE_LTS | true | Warn when only non-LTS Node.js releases are allowed | |
node.warnDays | SENTINEL_NODE_WARN_DAYS | 180 | Warn this many days before end of life | |
node.packagePattern | SENTINEL_NODE_PACKAGE_PATTERN | (^|/)package\.json$ | Files read for "engines.node" (regex on the relative path) | |
node.ciPattern | SENTINEL_NODE_CI_PATTERN | (^|/)(\.github/workflows/[^/]+|azure-pipelines[^/]*|\.azure-pipelines/[^/]+)\.ya?ml$ | CI pipeline files read for the Node.js version they set up (regex on the relative path) | |
node.containerPattern | SENTINEL_NODE_CONTAINER_PATTERN | (^|/)(Dockerfile|Containerfile)([.-][\w.-]+)?$ | Dockerfiles read for the node image they build on (regex on the relative path) | |
node.versionFilePattern | SENTINEL_NODE_VERSION_FILE_PATTERN | (^|/)\.(nvmrc|node-version)$ | Files read as Node.js version files (regex on the relative path) | |
cf.feed | SENTINEL_CF_FEED | https://raw.githubusercontent.com/cloudfoundry/nodejs-buildpack/master/manifest.yml | Manifest of the Cloud Foundry Node.js buildpack: a URL, or a path to a downloaded copy | |
cf.warnDays | SENTINEL_CF_WARN_DAYS | 180 | Warn this many days before a Node.js line leaves the buildpack | |
cf.descriptorPattern | SENTINEL_CF_DESCRIPTOR_PATTERN | (^|/)(mta\.yaml|manifest\.ya?ml)$ | Files read as Cloud Foundry deployment descriptors (regex on the relative path) | |
cf.nodeModuleTypes | SENTINEL_CF_NODE_MODULE_TYPES | nodejs,approuter.nodejs,javascript.nodejs,hdb | MTA module types that run on the Node.js buildpack (replaces the default list) | |
cap.registry | SENTINEL_CAP_REGISTRY | https://registry.npmjs.org | npm registry to ask about CAP packages: a URL, or a folder with downloaded copies | |
cap.packages | SENTINEL_CAP_PACKAGES | @sap/cds,@sap/cds-dk,@sap/cds-mtxs | Packages whose major version is checked (replaces the default list) | |
cap.warnDays | SENTINEL_CAP_WARN_DAYS | 180 | Warn this many days before the estimated end of life of the previous major | |
cap.maintenanceMonths | SENTINEL_CAP_MAINTENANCE_MONTHS | 12 | How long the previous major is maintained after a new one is released | |
cap.packagePattern | SENTINEL_CAP_PACKAGE_PATTERN | (^|/)package\.json$ | Files read for CAP dependencies (regex on the relative path) | |
audit.registry | SENTINEL_AUDIT_REGISTRY | https://registry.npmjs.org | npm registry to ask about known vulnerabilities | |
audit.lockfilePattern | SENTINEL_AUDIT_LOCKFILE_PATTERN | (^|/)(package-lock|npm-shrinkwrap)\.json$ | Lockfiles whose installed packages are checked (regex on the relative path) | |
audit.reportFrom | SENTINEL_AUDIT_REPORT_FROM | moderate | Vulnerabilities below this advisory severity are not reported: info, low, moderate, high, critical | |
audit.warnAt | SENTINEL_AUDIT_WARN_AT | high | Advisory severity from which a vulnerability is a warning (below: info): info, low, moderate, high, critical | |
audit.errorAt | SENTINEL_AUDIT_ERROR_AT | critical | Advisory severity from which a vulnerability is an error: info, low, moderate, high, critical | |
license.lockfilePattern | SENTINEL_LICENSE_LOCKFILE_PATTERN | (^|/)(package-lock|npm-shrinkwrap)\.json$ | Lockfiles whose installed packages' licenses are checked (regex on the relative path) | |
license.deny | SENTINEL_LICENSE_DENY | AGPL-1.0,AGPL-3.0,GPL-1.0,GPL-2.0,GPL-3.0,SSPL-1.0,EUPL-1.1,EUPL-1.2,OSL-3.0 | SPDX license ids that are errors (strong copyleft by default; -only and -or-later variants match; replaces the default list) | |
license.allow | SENTINEL_LICENSE_ALLOW | (none) | SPDX license ids that are allowed; when set, any other license is a warning (default: everything not denied) | |
license.unknown | SENTINEL_LICENSE_UNKNOWN | info | Severity for a package without an SPDX license, e.g. "SEE LICENSE IN LICENSE" or none: ok, info, warn, error |
List values are comma-separated in flags and environment variables, and JSON arrays in the config file. Example config:
{
"project": "Customer A / Orders app",
"skipChecks": [],
"scan": { "exclude": ["node_modules", ".git", "dist", "vendor"] },
"ui5": {
"requireLts": true,
"warnDays": 90,
"cdnHosts": ["ui5.sap.com", "cdn.customer.example"],
"manifestPattern": "^app/[^/]+/webapp/manifest\\.json$"
}
}
Notes on the UI5 settings:
ui5.feedcan point to a downloaded copy of the feed, for runners that cannot reachui5.sap.com.ui5.maintenanceDate: the feed carries two end-of-maintenance dates per version.eomm(the default) is the "End of Maintenance" SAP shows on the version overview page for SAP BTP.eomis a second, often much later date that appears to apply to on-premise installations.earliestuses whichever comes first. The feed's status text decides whether a version is reported as out of maintenance (an error); the date drives the advance warning, and a date that has passed while the status still says "Maintenance" is a warning.ui5.probes(config file only) is a list of{ "name", "url" }for systems that host their own UI5 library. Each URL must return JSON with a top-levelversionfield. Apps on SAP BTP do not need one.
π Ignoring findings
A finding the team has looked at and decided to live with, for now, can be ignored in the config file. Each rule names what it matches, and ends on a date, so the decision comes back for review instead of being forgotten:
{
"ignore": [
{ "advisory": "GHSA-29mw-wpgm-hmr9", "until": "2027-01-31", "reason": "lodash is only used by a build script" },
{ "check": "ui5-version", "file": "^legacy/", "until": "2026-12-31", "reason": "The legacy app is retired in December" },
{ "check": "cap-version", "package": "@sap/cds", "version": "8.9.4" }
]
}
| Field | Matches |
|---|---|
check | The check id (see Checks) |
file | The finding's file (regex on the relative path) |
package | An npm package (npm-audit, cap-version) |
version | The version the finding is about, exactly |
advisory | A vulnerability, by GitHub advisory id (GHSA-...) or npm advisory number |
message | The finding's text (regex) |
until | Last day the rule applies (YYYY-MM-DD); without it, the rule never ends |
reason | Why, shown with the ignored finding |
- Every field a rule gives must match, and it must give at least one of
file,package,version,advisoryormessage. To stop a whole check, useskipChecksinstead. - An ignored advisory is left out on its own. A package with other advisories is still reported, with the severity of the ones that are left.
- Ignored findings are not notified, do not fail the run and are not
fixed. The report lists them under
ignored, with the reason and date, and the Teams card says how many there are. - A rule past its date stops applying, and the report says so (info), so the finding is back and the rule can be removed or given a new date.
- A rule that matches nothing is reported too (info), once every check it could match has run cleanly.
- A rule that cannot be read stops the run with exit code
2. ignorecan also be set in a shared config. As with other lists, a project's ownignorelist replaces it.
π Shared config
A shared config holds settings for many projects in one place. Change it there, and every project that points at it follows on its next run, without anyone editing those projects.
It is an ordinary config file (see
examples/shared-config.json), hosted where
the pipelines can read it. Tell a project where it is in one of three ways:
| Where | How |
|---|---|
| Command line | --shared-config <url or file> |
| Environment variable | SENTINEL_SHARED_CONFIG=<url or file> |
| The project's config file | "sharedConfig": "<url or file>" (a file path is relative to that config file) |
Its values rank below the project's own settings and above the defaults, so
a project can still override whatever it needs to. --show-config names the
shared config in use and marks each value that came from it as [shared].
- If it cannot be read, the run stops with exit code
2. Scanning with a different policy than intended would be worse than a visible failure. - The webhook and heartbeat addresses are never read from it, as with the project's config file.
- Lists replace, they do not combine. A project that sets
scan.excludegets its own list, not the shared one plus its own. - A shared config cannot point at another one.
- Use different files for different groups of projects by pointing them at different addresses.
Whoever can change the shared file changes how every project that uses it is scanned, including where the checks get their data from. Host it somewhere with the same care as the tool itself.
β° Running on a schedule
examples/ has a GitHub Actions workflow and an Azure DevOps
pipeline. Both run weekly without needing new commits, and both are set up so
that nothing in the file has to be edited: everything is configured where the
platform keeps its variables.
| GitHub | Azure DevOps | |
|---|---|---|
| Where | Settings β Secrets and variables β Actions | Pipelines β the pipeline β Edit β Variables |
| Webhook and heartbeat addresses | Secrets SENTINEL_WEBHOOK_URL, SENTINEL_HEARTBEAT_URL | Secret variables with the same names |
| Any other setting | A variable named like its environment variable, e.g. SENTINEL_NOTIFY_ON | The same |
On GitHub, variables defined for a whole organization work too, which sets a
value for all of a customer's repositories at once. The GitHub workflow picks
up every variable whose name starts with SENTINEL_, so settings added to
the tool later need no change to the workflow file either.
This repository runs the GitHub example on itself, unchanged
(.github/workflows/stack-sentinel.yml), and a test keeps the two files
identical.
GitHub disables scheduled workflows in public repositories after 60 days without repository activity. That rule applies to public repositories only, so customer repositories, which are normally private, keep their schedule.
What the card links to
On GitHub Actions and Azure DevOps the tool detects the pipeline run and the
repository it scanned, and the Teams card gets "Open pipeline run" and "Open
repository" buttons. The JSON report carries them as links. On other CI
systems, set SENTINEL_RUN_URL and SENTINEL_REPOSITORY_URL.
When a shared config is used, its address is printed in the output, shown at
the bottom of the card, and included in the report as sharedConfig.
Testing a new pipeline
By default a card is only sent when there is at least a warning, so a healthy
project sends nothing. To see a card from a first run, add the variable
SENTINEL_NOTIFY_ON with the value ok, start the pipeline by hand, and
remove the variable afterwards. The last lines of the tool's output say
whether a notification was sent, and if not, why: no webhook address reached
the tool (usually a missing or misnamed secret), or the status was below the
threshold.
π§ Fix pull requests
With SENTINEL_FIX_MODE=pr the scheduled run also opens pull requests that
fix what can be fixed safely, much like Dependabot. By default only edits that
change one version in one file are made:
| Check | What is changed |
|---|---|
ui5-version | framework.version and the fiori-tools-proxy ui5.version in ui5.yaml, the version in CDN bootstrap URLs (a version is added where none is set), and "sap.platform.cf".ui5VersionNumber in manifest.json (added where it is missing). A fiori-tools-proxy without a version gets the one the app builds with (framework.version in a ui5*.yaml of the same folder), or else the recommended one |
node-version, cf-node-version | The Node.js version in CI pipelines (setup-node, NodeTool, UseNode) and in FROM node:<tag> is moved to the recommended major. .nvmrc and .node-version are set to the recommended Node.js major, "engines.node" to ^<major>, a plain lower bound such as >=18 is raised, an exact version on Cloud Foundry (22.11.0) becomes a range the buildpack can stage (22.x), and a Cloud Foundry app that declares none gets "engines.node" for the line the buildpack keeps longest. Where the two checks disagree, the version the Cloud Foundry buildpack ships wins |
npm-audit | Overrides in package.json that are unused or no longer needed are removed |
Two more kinds run npm to bring package-lock.json up to date, and are only
made when fix.groups names them:
| Group | What is changed |
|---|---|
cap | A CAP package (cap-version) on an old major moves to ^<current major> in package.json, and the lockfile next to it is updated with npm install --package-lock-only --ignore-scripts. It opens as a draft, as a new major can need code changes (see the CAP release notes) |
npm-audit | Vulnerable packages that npm audit fix can move on its own, after raising a range the project's own package.json pins below the fix to the oldest published release that fixes it ("lodash": "4.17.20" becomes "4.18.0"), are moved with npm install and npm audit fix, both with --package-lock-only --ignore-scripts. A package that a dependency's own range or a bundled copy holds back is left to a person, and so is a package npm did not move |
npm runs in a temporary folder with only package-lock.json, .npmrc and
the package.json files the lockfile covers (the project's and those of its
npm workspaces), so no packages are installed and no package scripts run. It
needs npm on the path and access to the registry, as an npm install has.
Nothing else is changed automatically: not minUI5Version, which states
which versions an app supports, and not a missing "engines.node" outside
Cloud Foundry, which would be a guess.
- One pull request per kind of fix, on a branch whose name never changes
(
stack-sentinel/ui5,stack-sentinel/node,stack-sentinel/npm-overrides,stack-sentinel/cap,stack-sentinel/npm-audit). Each run updates it while the findings remain, for example to a newer patch, and closes it when they are gone. - Closing a pull request without merging skips those versions: the next run opens a new one only when there is a newer version to move to.
- The edits are made to the default branch as it is at the time of the run. A change whose file no longer holds the version the scan saw is left out.
- Choose what is fixed with
fix.groups:SENTINEL_FIX_GROUPS=ui5fixes UI5 versions only, and leaves npm overrides to be reported;SENTINEL_FIX_GROUPS=ui5,node,npm-overrides,cap,npm-auditturns on all of them. A pull request of a kind that is turned off is left open as it is. - Workflow files on GitHub (
.github/workflows/*.yml) can only be changed by a token with the "Workflows" permission, whichGITHUB_TOKENcannot have. Without one, they are left out of the pull request, which says so, and the rest goes through. - Auto-merge is off by default.
SENTINEL_FIX_AUTO_MERGE=patchturns it on for pull requests that only move to newer patches (UI5 1.148.12 to 1.148.13),allfor every one. The pull request is then merged once its required checks pass, never before: on GitHub this needs "Allow auto-merge" and a branch protection rule with required checks, and since checks do not start for pull requests opened withGITHUB_TOKEN, aSENTINEL_FIX_TOKEN. On Azure DevOps it sets the pull request to complete by itself once its branch policies pass. If it cannot be turned on, the pull request stays open and the output says why. Draft pull requests (cap) are never set to merge. - Release notes are part of each pull request: links to the SAPUI5
change log of the new version, the Node.js change log of the new major and
the CAP release notes. For
npm-audit, each package lists the advisories it fixes and, when its repository is on GitHub, the release notes published there between the old and the new version (the newest five, folded). Text from those releases cannot notify anyone or link issues: mentions and#123references are broken, and GitHub links go throughredirect.github.com. On GitHub Actions the requests use the pipeline's token, against the API's rate limit for anonymous use. On Azure DevOps, whose descriptions hold 4000 characters, there are links only. Release notes that cannot be read become a link; they never stop a pull request. - Wait before moving to a new release with
minReleaseAgeDays, like Renovate'sminimumReleaseAge:SENTINEL_MIN_RELEASE_AGE_DAYS=3moves only to releases that have been out for three days, so a broken or hijacked release is usually withdrawn before a pull request picks it up. This matters most with auto-merge. A UI5 patch counts from the build date on the SAP CDN (sap-ui-version.json), and until it is old enough the findings recommend the patch before it. Forcapandnpm-audit, npm gets--before, so it picks only releases published before then; a vulnerability whose only fix is newer stays open, and the pull request says so. Node.js fixes name a major version, not a release, and are not held back. It is off (0) by default, and applies to security fixes too. - At most
fix.maxPullRequests(default 5) are open at a time. - Moving to a new release line (UI5 1.120 to 1.148, Node.js 20 to 24) is a normal pull request too. The project's own checks on the pull request are what show whether the app still works.
- The links to the pull requests are on the Teams card and in the JSON report
(
pullRequests). SENTINEL_FIX_MODE=apply(or--fix apply) only changes the files in the scanned folder, for a local run or a pipeline of your own.
| GitHub Actions | Azure DevOps (Azure Repos) | |
|---|---|---|
| Turn it on | Variable SENTINEL_FIX_MODE = pr | Pipeline variable SENTINEL_FIX_MODE = pr |
| Allow it once | Settings β Actions β General β "Allow GitHub Actions to create and approve pull requests" | Project settings β Repositories β the repository β Security β the project's build service: "Contribute" and "Contribute to pull requests" |
| Token | The workflow's own GITHUB_TOKEN; nothing to set | $(System.AccessToken), mapped in the example |
| The pull request's checks | GitHub starts no workflows for pull requests opened with GITHUB_TOKEN. To have them run, set the secret SENTINEL_FIX_TOKEN to a GitHub App token or a fine-grained personal access token with "Contents" and "Pull requests" write access | Run as usual |
| An open pull request after the default branch moved | Rebuilt on top of the default branch | Gets a commit on top, because pipelines may not force-push |
The examples already carry the permissions and the token mapping, so turning it on needs no change to the pipeline file.
π Dashboard
With SENTINEL_DASHBOARD_ENABLED=true, every run keeps one issue (GitHub) or
work item (Azure DevOps) up to date, like Renovate's Dependency Dashboard. It
is where people find the state of the stack without the Teams channel: every
finding with what to do, the open fix pull requests (and those not opened, with
why), and the ignored findings with their reason and end date. The Teams card
links it.
- One per repository, titled
stack-sentinel: <project>(dashboard.title) and found again by its label or tag (dashboard.label). Each run replaces its text, so edits to it are lost; change the project instead. - Closing it does not stop it: the next run opens a new one. Turn
dashboard.enabledoff to stop. - It is written after the fix pull requests, so it links the ones this run
opened. It does not depend on
fix.mode. - If it cannot be written, the report is still sent, and the run then exits
with code
2.
| GitHub Actions | Azure DevOps | |
|---|---|---|
| What it is | An issue with the label stack-sentinel | A work item of type Task (dashboard.workItemType) with the tag stack-sentinel, in the pipeline's project |
| Allow it once | issues: write in the workflow's permissions (the example has it) | The project's build service needs "Edit work items in this node" on the area path (Project settings β Project configuration β Areas) |
| Token | GITHUB_TOKEN or SENTINEL_FIX_TOKEN | $(System.AccessToken), mapped in the example |
π Heartbeat
A project that reports nothing looks the same as a project whose pipeline has
stopped running. To tell them apart, set SENTINEL_HEARTBEAT_URL. After
every completed run the tool posts a short status message there:
{
"tool": "stack-sentinel",
"toolVersion": "0.3.0",
"project": "Customer A / Orders app",
"generatedAt": "2026-10-12T06:17:03.000Z",
"status": "warn",
"summary": { "error": 0, "warn": 2, "info": 1, "ok": 4 },
"checks": { "run": ["ui5-version", "node-version"], "skipped": [] }
}
Point it at a service that expects a regular ping and alerts when one is missing (a "dead man's switch"); give each project its own address there. The tool itself stays stateless: it only sends the ping, the service notices the gap.
- The heartbeat is sent whatever the findings are. It means "this project was scanned", not "this project is fine".
- It is sent last, and only if the report was delivered. If the webhook rejects the report, no heartbeat goes out, so the gap shows up.
- It contains no findings, only counts.
- If the heartbeat cannot be delivered, the run exits with code
2. - It is sent as a POST with the message above. Some services only accept
GET, among them Uptime Kuma 1.x; for those set
SENTINEL_HEARTBEAT_METHODtoGET(no message is sent then, only the ping). Uptime Kuma 2.x accepts POST.
π€ AI coding agents
The repository ships an agent skill that teaches coding agents such as Claude Code, Codex or GitHub Copilot to set stack-sentinel up in a project: it runs a first scan, adds the pipeline example unchanged, and gives the user a short list of the variables, secrets and permissions to set, with the exact names and where to click. It also knows why a run sent no card or opened no pull request, and how to ignore a finding with a reason and an end date. It never writes the webhook address or a token into a file.
The repository is a plugin in the cbs Agentic Marketplace, so the skill installs once for all projects:
/plugin marketplace add cbs-consulting/agentic-marketplace # Claude Code
/plugin install stack-sentinel@cbs-consulting
copilot plugin marketplace add cbs-consulting/agentic-marketplace # GitHub Copilot CLI
copilot plugin install stack-sentinel@cbs-consulting
codex plugin marketplace add cbs-consulting/agentic-marketplace # Codex, then /plugins
Other agents that read the Agent Skills format get
it with npx skills add cbs-consulting/stack-sentinel, or by copying
skills/stack-sentinel/ into their skills folder.
Then ask the agent to "set up stack-sentinel for this project".
The plugin follows the default branch of this repository. A test checks that the skill names only settings and flags the tool has.
π Releases
stack-sentinel is published to npm as
@cbs-consulting/stack-sentinel.
What follows the package name chooses the release:
| Install | What you get | Use it for |
|---|---|---|
@cbs-consulting/stack-sentinel@latest | The latest release; changes when a new one is published | Most projects, and any project nobody will maintain: the tool stays current without anyone editing the pipeline |
@cbs-consulting/stack-sentinel@0.3.0 | Exactly that release, until someone changes the version | Projects where every change to the pipeline must be deliberate |
Write @latest out with npx. Without it, npx can keep using a copy it
downloaded earlier, which matters on build agents that are not wiped
between runs.
Releases are made by the "Release" workflow in the Actions tab, which
- runs the tests and the live feed tests on the commit to release,
- requires a higher version in
package.jsonthan the latest one on npm, - stages it on npm, with a provenance statement that ties the package to this repository and commit, and
- publishes that commit as the GitHub release
v<version>, with the version's entry inCHANGELOG.mdas the release notes.
Every change goes into the "Unreleased" section of CHANGELOG.md in its
pull request. The "Changelog entry" check fails on pull requests that do not
change CHANGELOG.md; give those that change nothing a user notices (chores,
CI, typos) the label "no changelog". To prepare a release, raise the version in package.json (and in
plugin.json and .claude-plugin/plugin.json, which a test checks) and
rename "Unreleased" to <version> - <date>. The tests fail while the version
in package.json has no entry, so neither the pull request nor the release
can go through without one.
A staged version is not installable yet. It goes live, and becomes
@latest, when a maintainer approves it with two-factor authentication: on
npmjs.com under the package's staged versions, or with
npm stage approve <stage-id>. Every release that reaches customer
pipelines has therefore been looked at by a person.
The workflow has a "dry run" option that does steps 1 and 2 and changes nothing.
stack-sentinel --version prints the running version. Every report and
heartbeat carries it as toolVersion, and the Teams card shows it, so you can
see which release each project is on.
π οΈ Contributing
There is nothing to install: clone the repo and run npm test with Node.js 22
or newer. CONTRIBUTING.md explains how to propose a change,
and SECURITY.md how to report a vulnerability privately.
Adding a check
Add a module in src/checks/ exporting { id, run(ctx) } that returns
findings, and register it in src/checks/index.js. A finding is
{ check, severity, source, file?, version?, message, details? } with
severity ok, info, warn or error. Describe it in
docs/CHECKS.md and add it to the table under
Checks.
Testing
npm test # unit and end-to-end tests, no outside network needed
npm run test:live # checks SAP's real feed still has the format the tool expects
- Unit tests (
test/ui5.test.js,test/node.test.js,test/cf-node.test.js,test/cap.test.js,test/npm-audit.test.js,test/pipeline.test.js,test/settings.test.js) cover the version rules and the settings, against trimmed copies of the feeds intest/fixtures/. - End-to-end tests (
test/cli.test.js) run the real command against a local server that plays SAP's feed and the webhook receiver, and check the output, the exit code and what was posted. - Live feed test (
live/feed.live.js) downloads the real feeds (SAP's UI5 version overview, the Node.js release schedule, the Cloud Foundry buildpack manifest, the npm registry and its vulnerability service) and fails if a field, status text or date format is no longer what the tool understands.
GitHub Actions runs npm test on every push and pull request, on Node.js 22,
24 and 26, and the live feed test every Monday and on demand.
A git hook can run the tests locally before each push as well. Enable it once per clone:
npm run hooks
To try a notification by hand, point --webhook at a Teams workflow URL, or
at a request inspector to see the payload:
stack-sentinel test/fixtures/app --webhook https://<your-endpoint>
Decisions
docs/DECISIONS.md records why the tool works the way it
does, what was deliberately left out, and what is still unverified.
π License
Copyright Β© 2026 cbs Corporate Business Solutions Unternehmensberatung GmbH. Licensed under the Apache License 2.0.
SAP, SAP BTP, SAPUI5 and SAP Fiori are trademarks of SAP SE. Node.js is a trademark of the OpenJS Foundation. This project is not affiliated with or endorsed by SAP or the OpenJS Foundation.