Skip to content

IONOS(ci): Add Psalm taint analysis for external apps - #321

Open
bromiesTM wants to merge 9 commits into
ionos-devfrom
kh/dev/static-analysis
Open

IONOS(ci): Add Psalm taint analysis for external apps#321
bromiesTM wants to merge 9 commits into
ionos-devfrom
kh/dev/static-analysis

Conversation

@bromiesTM

Copy link
Copy Markdown

No description provided.

Add automated security scanning (SAST) for apps-external submodules
that have psalm.xml. Uses a matrix strategy to run per-app analysis
with non-blocking errors for existing findings in upstream apps.

Also enable workflow on feature branch and release candidate branches
for testing purposes.

Signed-off-by: Kai Henseler <kai.henseler@strato.de>
@bromiesTM
bromiesTM force-pushed the kh/dev/static-analysis branch from ce44030 to 91a988e Compare August 19, 2026 12:45
GitHub's SARIF uploader requires endColumn values to be at least 1.
This step ensures Psalm's taint analysis results are compatible with
the security tab by replacing any invalid values with 1.

Signed-off-by: Kai Henseler <kai.henseler@strato.de>
matsaur and others added 7 commits September 1, 2026 11:14
Without authentication, Composer downloads from api.github.com hit
GitHub's unauthenticated rate limit, causing transient HTTP 504 errors
across all matrix app jobs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
user_oidc locks psalm/phar 6.13.1 which requires PHP >=8.2, but the
workflow runs 8.1. Static analysis does not execute the code, so
platform constraints on analysis tooling do not matter at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- apps/theming/lib/Controller/IconController.php: extend @return type to
  include 'image/png' — the IONOS fallback path returns a png DataDisplayResponse
  but the annotation only declared 'image/x-icon', causing MoreSpecificReturnType
  and InvalidReturnStatement errors.

- build/psalm-baseline-security.xml: remove the fixed $appIcon TaintedFile
  entry from IconBuilder.php; it was resolved upstream and --update-baseline
  was removing it at runtime, causing git diff --exit-code to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The codeql-action/upload-sarif step requires this permission to post
results to the GitHub Security tab. Without it the upload fails with
"Resource not accessible by integration".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move generate-sast-matrix and static-code-analysis-security-apps out of
static-code-analysis.yml into a new standalone ionos-sast-apps.yml. This
isolates IONOS-specific logic so the upstream workflow file can be kept
unmodified and synced without conflicts.
Drop the IONOS-specific additions that were embedded in this file (now in
ionos-sast-apps.yml) and pull in the current upstream content: PHP 8.3,
dorny/paths-filter change detection, psalm:strict job, and the summary
gate job needed for branch protection rules.
…igger

The previous commit over-shot by applying the full current upstream content
(PHP 8.3, psalm:strict, changes-filter). The correct baseline for this fork
is the ionos-dev sync state (PHP 8.1, action SHAs from the May 2025 sync).
The only intentional IONOS delta is adding rc/** to the push trigger so
release candidate branches are covered, and the security-events: write
permission already landed on ionos-dev.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants