Skip to content

cbs-consulting/stack-sentinel

v0.4.0Apache-2.0

Sets up @cbs-consulting/stack-sentinel in SAP UI5, CAP and Node.js projects: the weekly scan pipeline on GitHub Actions or Azure DevOps, Teams reports, fix pull requests and ignore rules.

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

CheckWhat it reportsCompared against
ui5-versionUI5 versions out of maintenance, not long-term maintenance, or removed from the CDNSAP's UI5 version overview
node-versionNode.js versions past or near end of lifeNode.js release schedule
cf-node-versionNode.js apps on Cloud Foundry asking for a version the buildpack no longer shipsCloud Foundry Node.js buildpack
cap-versionCAP packages on a major version SAP no longer supportsnpm registry
npm-auditInstalled npm packages with known vulnerabilitiesnpm audit service
licenseInstalled npm packages whose license the policy does not allow, such as strong copyleftlicense.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:

  1. command-line flag
  2. environment variable
  3. config file: sentinel.config.json in the scanned project, or the file named by --config / SENTINEL_CONFIG
  4. shared config, if one is set (see Shared config)
  5. 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 keyFlagEnvironment variableDefaultMeaning
project--projectSENTINEL_PROJECTName shown in reports (default: name of the scanned folder)
checks--checksSENTINEL_CHECKSRun only these checks
skipChecks--skip-checksSENTINEL_SKIP_CHECKS(none)Run all checks except these
output--outputSENTINEL_OUTPUTWrite the JSON report to this file
webhook--webhookSENTINEL_WEBHOOK_URLURL the report is posted to (not read from the config file, because it is a credential)
heartbeat--heartbeatSENTINEL_HEARTBEAT_URLURL that gets a short status message after every completed run (not read from the config file)
heartbeatMethodSENTINEL_HEARTBEAT_METHODPOSTHow the heartbeat is sent; GET carries no status message, for services that only accept GET: POST, GET
runUrl--run-urlSENTINEL_RUN_URLLink to this pipeline run, shown on the card (default: detected on GitHub Actions and Azure DevOps)
repositoryUrl--repository-urlSENTINEL_REPOSITORY_URLLink to the scanned repository, shown on the card (default: detected on GitHub Actions and Azure DevOps)
format--formatSENTINEL_FORMATteamsWebhook payload: teams, json
notifyOn--notify-onSENTINEL_NOTIFY_ONwarnNotify at or above this severity: ok, info, warn, error
failOn--fail-onSENTINEL_FAIL_ONerrorExit 1 at or above this severity: ok, info, warn, error, never
timeoutSeconds--timeoutSENTINEL_TIMEOUT_SECONDS30Timeout for each HTTP request
scan.exclude--excludeSENTINEL_SCAN_EXCLUDEnode_modules,.git,dist,build,gen,coverage,.cacheFolder names that are not scanned (replaces the default list)
scan.maxDepth--max-depthSENTINEL_SCAN_MAX_DEPTH8How many folder levels deep to scan
notify.maxFindingsSENTINEL_NOTIFY_MAX_FINDINGS25Most findings listed in one Teams card
minReleaseAgeDaysSENTINEL_MIN_RELEASE_AGE_DAYS0Recommend 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.enabledSENTINEL_DASHBOARD_ENABLEDfalseKeep 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.titleSENTINEL_DASHBOARD_TITLEstack-sentinel: {project}Title of the dashboard ({project} is the project name)
dashboard.labelSENTINEL_DASHBOARD_LABELstack-sentinelLabel (GitHub) or tag (Azure DevOps) the dashboard is found by
dashboard.workItemTypeSENTINEL_DASHBOARD_WORK_ITEM_TYPETaskAzure DevOps: the work item type of the dashboard
fix.mode--fixSENTINEL_FIX_MODEoffFix 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-groupsSENTINEL_FIX_GROUPSui5,node,npm-overridesKinds 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-onSENTINEL_FIX_ONinfoFix findings at or above this severity: ok, info, warn, error
fix.tokenSENTINEL_FIX_TOKENToken that opens the pull requests (default: GITHUB_TOKEN or SYSTEM_ACCESSTOKEN; not read from the config file)
fix.autoMergeSENTINEL_FIX_AUTO_MERGEoffLet 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.branchPrefixSENTINEL_FIX_BRANCH_PREFIXstack-sentinel/Start of the branch names of fix pull requests
fix.maxPullRequestsSENTINEL_FIX_MAX_PULL_REQUESTS5Most fix pull requests open at the same time
ui5.feedSENTINEL_UI5_FEEDhttps://ui5.sap.com/versionoverview.jsonVersion overview feed: a URL, or a path to a downloaded copy
ui5.requireLtsSENTINEL_UI5_REQUIRE_LTStrueWarn about versions that are not long-term maintenance
ui5.warnDaysSENTINEL_UI5_WARN_DAYS180Warn this many days before an end date
ui5.maintenanceDateSENTINEL_UI5_MAINTENANCE_DATEeommEnd-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.versionInfoUrlSENTINEL_UI5_VERSION_INFO_URLhttps://ui5.sap.com/{version}/resources/sap-ui-version.jsonWhere the build date of a UI5 patch is read, for minReleaseAgeDays ({version} is replaced)
ui5.cdnHostsSENTINEL_UI5_CDN_HOSTSui5.sap.com,sapui5.hana.ondemand.com,openui5.hana.ondemand.com,sdk.openui5.orgHosts recognised in bootstrap URLs (replaces the default list)
ui5.yamlPatternSENTINEL_UI5_YAML_PATTERN(^|/)ui5([-.][\w.-]+)?\.ya?ml$Files read as UI5 tooling config (regex on the relative path)
ui5.htmlPatternSENTINEL_UI5_HTML_PATTERN\.html?$Files searched for a bootstrap URL (regex on the relative path)
ui5.testPagePatternSENTINEL_UI5_TEST_PAGE_PATTERN\.qunit\.html?$HTML files treated as local test pages, reported as info at most (regex on the relative path)
ui5.testPageContentSENTINEL_UI5_TEST_PAGE_CONTENTsap/ushell/bootstrap/sandbox\d*\.jsHTML files containing this are treated as local test pages, e.g. a launchpad sandbox (regex on the file content)
ui5.manifestPatternSENTINEL_UI5_MANIFEST_PATTERN(^|/)manifest\.json$Files read as app manifests (regex on the relative path)
node.feedSENTINEL_NODE_FEEDhttps://raw.githubusercontent.com/nodejs/Release/main/schedule.jsonNode.js release schedule: a URL, or a path to a downloaded copy
node.requireLtsSENTINEL_NODE_REQUIRE_LTStrueWarn when only non-LTS Node.js releases are allowed
node.warnDaysSENTINEL_NODE_WARN_DAYS180Warn this many days before end of life
node.packagePatternSENTINEL_NODE_PACKAGE_PATTERN(^|/)package\.json$Files read for "engines.node" (regex on the relative path)
node.ciPatternSENTINEL_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.containerPatternSENTINEL_NODE_CONTAINER_PATTERN(^|/)(Dockerfile|Containerfile)([.-][\w.-]+)?$Dockerfiles read for the node image they build on (regex on the relative path)
node.versionFilePatternSENTINEL_NODE_VERSION_FILE_PATTERN(^|/)\.(nvmrc|node-version)$Files read as Node.js version files (regex on the relative path)
cf.feedSENTINEL_CF_FEEDhttps://raw.githubusercontent.com/cloudfoundry/nodejs-buildpack/master/manifest.ymlManifest of the Cloud Foundry Node.js buildpack: a URL, or a path to a downloaded copy
cf.warnDaysSENTINEL_CF_WARN_DAYS180Warn this many days before a Node.js line leaves the buildpack
cf.descriptorPatternSENTINEL_CF_DESCRIPTOR_PATTERN(^|/)(mta\.yaml|manifest\.ya?ml)$Files read as Cloud Foundry deployment descriptors (regex on the relative path)
cf.nodeModuleTypesSENTINEL_CF_NODE_MODULE_TYPESnodejs,approuter.nodejs,javascript.nodejs,hdbMTA module types that run on the Node.js buildpack (replaces the default list)
cap.registrySENTINEL_CAP_REGISTRYhttps://registry.npmjs.orgnpm registry to ask about CAP packages: a URL, or a folder with downloaded copies
cap.packagesSENTINEL_CAP_PACKAGES@sap/cds,@sap/cds-dk,@sap/cds-mtxsPackages whose major version is checked (replaces the default list)
cap.warnDaysSENTINEL_CAP_WARN_DAYS180Warn this many days before the estimated end of life of the previous major
cap.maintenanceMonthsSENTINEL_CAP_MAINTENANCE_MONTHS12How long the previous major is maintained after a new one is released
cap.packagePatternSENTINEL_CAP_PACKAGE_PATTERN(^|/)package\.json$Files read for CAP dependencies (regex on the relative path)
audit.registrySENTINEL_AUDIT_REGISTRYhttps://registry.npmjs.orgnpm registry to ask about known vulnerabilities
audit.lockfilePatternSENTINEL_AUDIT_LOCKFILE_PATTERN(^|/)(package-lock|npm-shrinkwrap)\.json$Lockfiles whose installed packages are checked (regex on the relative path)
audit.reportFromSENTINEL_AUDIT_REPORT_FROMmoderateVulnerabilities below this advisory severity are not reported: info, low, moderate, high, critical
audit.warnAtSENTINEL_AUDIT_WARN_AThighAdvisory severity from which a vulnerability is a warning (below: info): info, low, moderate, high, critical
audit.errorAtSENTINEL_AUDIT_ERROR_ATcriticalAdvisory severity from which a vulnerability is an error: info, low, moderate, high, critical
license.lockfilePatternSENTINEL_LICENSE_LOCKFILE_PATTERN(^|/)(package-lock|npm-shrinkwrap)\.json$Lockfiles whose installed packages' licenses are checked (regex on the relative path)
license.denySENTINEL_LICENSE_DENYAGPL-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.0SPDX license ids that are errors (strong copyleft by default; -only and -or-later variants match; replaces the default list)
license.allowSENTINEL_LICENSE_ALLOW(none)SPDX license ids that are allowed; when set, any other license is a warning (default: everything not denied)
license.unknownSENTINEL_LICENSE_UNKNOWNinfoSeverity 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.feed can point to a downloaded copy of the feed, for runners that cannot reach ui5.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. eom is a second, often much later date that appears to apply to on-premise installations. earliest uses 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-level version field. 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" }
  ]
}
FieldMatches
checkThe check id (see Checks)
fileThe finding's file (regex on the relative path)
packageAn npm package (npm-audit, cap-version)
versionThe version the finding is about, exactly
advisoryA vulnerability, by GitHub advisory id (GHSA-...) or npm advisory number
messageThe finding's text (regex)
untilLast day the rule applies (YYYY-MM-DD); without it, the rule never ends
reasonWhy, shown with the ignored finding
  • Every field a rule gives must match, and it must give at least one of file, package, version, advisory or message. To stop a whole check, use skipChecks instead.
  • 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.
  • ignore can also be set in a shared config. As with other lists, a project's own ignore list 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:

WhereHow
Command line--shared-config <url or file>
Environment variableSENTINEL_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.exclude gets 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.

GitHubAzure DevOps
WhereSettings β†’ Secrets and variables β†’ ActionsPipelines β†’ the pipeline β†’ Edit β†’ Variables
Webhook and heartbeat addressesSecrets SENTINEL_WEBHOOK_URL, SENTINEL_HEARTBEAT_URLSecret variables with the same names
Any other settingA variable named like its environment variable, e.g. SENTINEL_NOTIFY_ONThe 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:

CheckWhat is changed
ui5-versionframework.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-versionThe 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-auditOverrides 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:

GroupWhat is changed
capA 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-auditVulnerable 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=ui5 fixes UI5 versions only, and leaves npm overrides to be reported; SENTINEL_FIX_GROUPS=ui5,node,npm-overrides,cap,npm-audit turns 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, which GITHUB_TOKEN cannot 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=patch turns it on for pull requests that only move to newer patches (UI5 1.148.12 to 1.148.13), all for 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 with GITHUB_TOKEN, a SENTINEL_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 #123 references are broken, and GitHub links go through redirect.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's minimumReleaseAge: SENTINEL_MIN_RELEASE_AGE_DAYS=3 moves 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. For cap and npm-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 ActionsAzure DevOps (Azure Repos)
Turn it onVariable SENTINEL_FIX_MODE = prPipeline variable SENTINEL_FIX_MODE = pr
Allow it onceSettings β†’ 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"
TokenThe workflow's own GITHUB_TOKEN; nothing to set$(System.AccessToken), mapped in the example
The pull request's checksGitHub 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 accessRun as usual
An open pull request after the default branch movedRebuilt on top of the default branchGets 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.enabled off 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 ActionsAzure DevOps
What it isAn issue with the label stack-sentinelA work item of type Task (dashboard.workItemType) with the tag stack-sentinel, in the pipeline's project
Allow it onceissues: 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)
TokenGITHUB_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_METHOD to GET (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:

InstallWhat you getUse it for
@cbs-consulting/stack-sentinel@latestThe latest release; changes when a new one is publishedMost projects, and any project nobody will maintain: the tool stays current without anyone editing the pipeline
@cbs-consulting/stack-sentinel@0.3.0Exactly that release, until someone changes the versionProjects 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

  1. runs the tests and the live feed tests on the commit to release,
  2. requires a higher version in package.json than the latest one on npm,
  3. stages it on npm, with a provenance statement that ties the package to this repository and commit, and
  4. publishes that commit as the GitHub release v<version>, with the version's entry in CHANGELOG.md as 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 in test/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.