Files
Bifrost/.claude/skills/secure-coding-plugin/SKILL.md
T

2.3 KiB

name, description
name description
secure-coding-plugin Use when adding or reviewing configuration, web-service inputs, authorization, outbound HTTP, secrets, or dependencies in the plugin.

Secure coding for this plugin

  • Require authenticated SonarQube users and check Create Projects on every action that enumerates or imports repositories.
  • Fail closed when the current-user permission response is absent or malformed. Verify local connector authorization behavior on the target instance before deployment.
  • Treat all browser input as untrusted. Bound batch size and string lengths; validate organization and repository identifiers before API calls.
  • Validate configured Gitea URL as absolute HTTP(S) with host and no userinfo, query, or fragment. The URL is trusted administrator configuration and may target a private Gitea host; never accept a request-specific outbound URL.
  • Disable redirects to avoid forwarding the Gitea token; do not expose outbound arbitrary URL input.
  • Store the token in a .secured PASSWORD property. Never return it from web services, JS, logs, errors, or generated files.
  • Use same-origin authenticated SonarQube requests for mutations; do not build custom cookie bypasses. Preserve SonarQube's normal CSRF/session protections.
  • Reject duplicate or colliding project keys before making any project mutations.
  • Pin dependencies, inspect transitive dependency changes, and keep the Sonar API provided.

Checklist

  • Every endpoint checks Create Projects.
  • URL, identifiers, and batch sizes validated.
  • Secret handling and redirects safe.
  • Project-key collisions fail closed.
  • Dependency versions pinned.

Sources

Not verified

  • Exact WebService framework CSRF behavior for custom POST actions must be validated on 25.9 during integration testing.
  • Local connector caller identity and api/users/current permission shape require a live 25.9 check.