Skip to content

Adds agents.md for External-Secrets Operator#150

Open
siddhibhor-56 wants to merge 1 commit into
openshift:mainfrom
siddhibhor-56:agents.md
Open

Adds agents.md for External-Secrets Operator#150
siddhibhor-56 wants to merge 1 commit into
openshift:mainfrom
siddhibhor-56:agents.md

Conversation

@siddhibhor-56

@siddhibhor-56 siddhibhor-56 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added comprehensive developer guidance covering project architecture, build/test workflows, API contract conventions, error-handling patterns, integration guidelines, performance optimization, security requirements, and testing strategies.
    • Added workflow preferences and setup recommendations for developers using the project.

@openshift-ci openshift-ci Bot requested review from TrilokGeer and bharath-b-rh June 8, 2026 07:18
@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: siddhibhor-56
Once this PR has been reviewed and has the lgtm label, please assign swghosh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Walkthrough

This PR introduces eight comprehensive documentation files establishing operational, API design, error handling, integration, performance, security, and testing guidelines for the external-secrets-operator. The docs define conventions for CRD validation, reconciliation patterns, platform integrations, and multi-tier test strategy.

Changes

Operator Documentation Guideline Suite

Layer / File(s) Summary
Project Structure and Developer Workflow
AGENTS.md, CLAUDE.md
AGENTS.md documents repository architecture (three controllers, directory structure, Go workspace, Makefile targets, code style, FIPS builds, naming conventions, reconciliation patterns, pitfalls, and environment variables). CLAUDE.md specifies build/test/lint commands and Claude Code preferences.
API Design and Validation Contracts
docs/api-contracts-guidelines.md
Defines CRD versioning/grouping, Kubebuilder markers, field-level validation, CEL XValidation patterns (singleton, immutability, cross-field dependencies), status subresource design, controller retry-on-conflict workflow, code generation pipeline, API integration test approach using declarative YAML, webhook architecture boundaries, and end-to-end checklist for new API fields.
Error Handling and Reconciliation Patterns
docs/error-handling-guidelines.md
Establishes ReconcileError classification (IrrecoverableError vs RetryRequiredError), result-to-requeue mapping, Kubernetes API error wrapping patterns, client/server retry strategies, status condition update rules, event recording and logging conventions, Exists helper behavior, panic boundaries for decode helpers, and NotFound handling for primary/dependent CRs.
Integration Architecture and Operational Patterns
docs/integration-guidelines.md
Describes CRD singleton/precedence model, bindata-driven operand reconciliation, conditional resource creation (cert-manager, Bitwarden), OpenShift platform integrations (trusted CA, proxy, network policies), runtime image substitution, client architecture (cached vs uncached), label/annotation validation, and plugin extension checklist.
Performance Conventions and Optimization
docs/performance-guidelines.md
Defines controller caching (label-filtered cache, uncached client usage), watch/predicate strategies, reconcile error classification and requeue rules, status/annotation update optimizations, conflict handling and update-with-retry patterns, concurrency guidance (resettable sync.Once), drift detection, asset decoding requirements, and E2E polling configuration.
Security Requirements and Hardening
docs/security-guidelines.md
Consolidates container security context hardening, non-root image requirements, HTTP/2 disabling, metrics endpoint protection, multi-tier RBAC scoping, reserved label/annotation/env-var restrictions, dual-mode TLS handling (cert-controller default vs cert-manager integration), Bitwarden TLS prerequisites, default-deny network policies, webhook security configuration, singleton constraints, trusted CA handling, non-hardcoded credential patterns, and drift detection expectations.
Testing Strategy and Execution
docs/testing-guidelines.md
Documents three-tier testing architecture: unit tests (pkg/ with table-driven testing and fake clients), API integration tests (test/apis/ using YAML-driven testsuites and envtest), and E2E tests (test/e2e/ via live clusters with Ginkgo labels and suite lifecycle hooks). Specifies make targets, build tags, fixture patterns, coverage generation, and CI configuration (GOFLAGS, envtest version, timeouts, artifact handling).

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The pull request title refers only to AGENTS.md, but the changeset includes seven documentation files (AGENTS.md, CLAUDE.md, and five docs/*.md files). The title significantly understates the scope of changes. Update the title to accurately reflect all major documentation additions, such as 'Add comprehensive documentation for operator development and architecture' or list the key documents added.
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning New Ginkgo e2e tests were added (test/e2e/e2e_test.go, bitwarden_es_test.go, etc.) but lack SNO compatibility guards like [Skipped:SingleReplicaTopology] labels or IsSingleNode() checks. Add SNO compatibility checks or labels to new e2e tests. Use [Skipped:SingleReplicaTopology] labels for tests not applicable to SNO, or guard tests with exutil.IsSingleNode() + g.Skip() for runtime topology checks.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test names are stable and deterministic. Tests use descriptive static strings with no dynamic pod names, timestamps, UUIDs, or IP addresses. API tests defined in YAML have static names.
Test Structure And Quality ✅ Passed PR adds only documentation files (AGENTS.md, CLAUDE.md, docs/*.md). No Ginkgo test code files (.go) are added or modified, making the Ginkgo test quality check not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added in this PR. All 8 files added are Markdown documentation only; no *_test.go or test code changes present.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds only documentation files with no code, manifests, or scheduling constraints. Existing deployments use safe defaults (single replicas, no problematic affinity rules).
Ote Binary Stdout Contract ✅ Passed PR adds only markdown documentation files. No executable code is added that could write to stdout during binary initialization.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed All new Ginkgo e2e tests use cluster-internal DNS names (not IPv4 addresses) and require no external internet connectivity, making them compatible with IPv6-only disconnected environments.
No-Weak-Crypto ✅ Passed PR adds documentation files only; no weak crypto (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto implementations, or non-constant-time secret comparisons found.
Container-Privileges ✅ Passed PR adds documentation files only. No privileged containers, no hostPID/hostIPC/hostNetwork:true, no SYS_ADMIN capabilities, and proper hardened security contexts enforced.
No-Sensitive-Data-In-Logs ✅ Passed No hardcoded passwords, tokens, API keys, or PII found in documentation. Guidelines explicitly prohibit string interpolation in logs and hardcoded credentials in tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (5)
docs/testing-guidelines.md (1)

17-113: 💤 Low value

Consider adding blank lines around headings for Markdown compliance.

Multiple headings violate MD022 (blanks-around-headings). While this is a minor formatting issue, adding blank lines improves readability and passes linting. Given the "Chill" review preference, this is optional.

Example:

 ## Unit Tests (`pkg/`)
 
 ### Conventions
+
 - Files live alongside source in the same package (e.g., `deployments.go` / `deployments_test.go`).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/testing-guidelines.md` around lines 17 - 113, The Markdown file has
multiple headings without surrounding blank lines (violating MD022); fix by
inserting a single blank line before and after each heading token (e.g., the
"### Conventions", "### Fake Client Pattern", "### Test Helpers", "### Error
Assertion", "### Adding a New Unit Test", "## API Integration Tests
(`test/apis/`)", "### Data-Driven Test Suites", "### envtest Setup", "###
Running", "### Adding a New API Test", "## E2E Tests (`test/e2e/`)", "### Build
Tag", "### Label-Based Platform Selection", "### E2E Structure", "### Test
Data", "### E2E Test Utilities (`test/utils/`)", "### Adding a New E2E Test") so
each heading is preceded and followed by exactly one blank line to satisfy lint
MD022 and improve readability.
CLAUDE.md (1)

9-51: ⚡ Quick win

Add blank lines around headings and code fences for Markdown compliance.

Multiple sections violate MD022 (blanks-around-headings) and MD031 (blanks-around-fences). While the content renders correctly in most viewers, proper spacing improves readability and passes linting.

📐 Example fix for one section
 
 ### Before Committing
+
 ```bash
 make update && make verify

This regenerates all code, manifests, and bindata, then runs verification checks. CI will reject PRs with stale generated files.


Apply similar spacing to all other sections (Development Workflow, Testing, Dependency Management, Claude Code Preferences).
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @CLAUDE.md around lines 9 - 51, Add a blank line before and after each
Markdown heading and before and after each fenced code block in CLAUDE.md (e.g.,
the "Before Committing", "Development Workflow", "Testing", "Dependency
Management", and "Claude Code Preferences" headings and their bash fences)
so the file complies with MD022 and MD031; specifically, ensure there is an
empty line separating the heading from the previous paragraph and an empty line
between the fenced code opening/closing lines and surrounding text throughout
the file.


</details>

<!-- cr-comment:v1:fc5ea020d20ce7d1cb3e1afc -->

</blockquote></details>
<details>
<summary>docs/api-contracts-guidelines.md (1)</summary><blockquote>

`23-23`: _💤 Low value_

**Consider addressing markdown formatting for better consistency.**

The markdownlint tool flagged several minor style issues:
- Line 23: The code block should specify a language (e.g., ````go`) and be surrounded by blank lines
- Several headings (lines 38, 43, 47, 54, 57, 82, 90, 95) should have blank lines before and after them

These don't affect functionality but would improve markdown parsing consistency and potentially enable better syntax highlighting.





Also applies to: 38-38, 43-43, 47-47, 54-54, 57-57, 82-82, 90-90, 95-95

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/api-contracts-guidelines.md at line 23, Update the markdown for
docs/api-contracts-guidelines.md by adding a language specifier to the code
fence at the shown code block (e.g., change togo) and ensure there is a
blank line before and after that fenced code block; also add a blank line before
and after each top-level heading referenced in the review (the headings at the
noted locations) so headings are separated from surrounding paragraphs and lists
for consistent markdownlint-compliant formatting.


</details>

<!-- cr-comment:v1:4182dd4ed530dcbd4d4b986e -->

_Source: Linters/SAST tools_

</blockquote></details>
<details>
<summary>docs/performance-guidelines.md (2)</summary><blockquote>

`1-93`: _⚡ Quick win_

**Add blank lines below section headings for consistency.**

Multiple level-3 headings (`###`) are missing blank lines below them before content begins (lines 5, 12, 19, 24, 38, 43, 51, 54, 59, 62, 65, 70, 77, 88, 91). Markdown best practice requires blank lines around headings for improved readability and consistency.




<details>
<summary>Example fix pattern</summary>

```diff
 ### Manager-Level Label-Filtered Cache
+
 The operator uses a single manager-level cache...
```

Apply this pattern to all flagged headings.
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/performance-guidelines.md` around lines 1 - 93, Add a single blank line
after each level-3 Markdown heading that currently runs straight into content so
headings follow the "blank line below headings" convention; specifically insert
a blank line after the headings "### Manager-Level Label-Filtered Cache", "###
Uncached Client Usage", "### Conditional CRD Cache Registration", "### Predicate
Strategy by Resource Type", "### Map Function Convention", "### Error
Classification and Requeue Strategy", "### Condition Update Optimization", "###
CR Annotation Patching", "### UpdateWithRetry Pattern", "### Status Update
Pattern", "### Bootstrap Resource Creation", "### Resettable sync.Once
(`common.Now`)", "### HasObjectChanged Pattern", and "### Asset Decoding" in the
document so each heading is followed by one empty line before its paragraph
content.
```

</details>

<!-- cr-comment:v1:e77c49c434d3ab410a8685d0 -->

_Source: Linters/SAST tools_

---

`5-21`: _⚡ Quick win_

**Consider removing hard-coded line reference.**

Line 8 references "line ~68" in `controller.go`. Hard-coded line numbers in documentation become stale as code evolves. Consider using a more resilient reference like "in `controllerManagedResources` constant" or "in the resource list near the cache builder initialization".

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/performance-guidelines.md` around lines 5 - 21, The doc references a
hard-coded line number ("line ~68" in controller.go); replace that brittle
reference with a resilient identifier such as the constant or symbol name (e.g.,
controllerManagedResources) and/or a contextual location (e.g., "the resource
list near NewCacheBuilder() / buildCacheObjectList() in
pkg/controller/external_secrets/controller.go") so readers can find where to
register new resources without relying on line numbers.
```

</details>

<!-- cr-comment:v1:ebe16097cce0cd6e4abe1069 -->

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @AGENTS.md:

  • Around line 28-49: The fenced directory-listing block in AGENTS.md is missing
    a language identifier; update the opening triple-backticks that precede the
    directory list (the block containing lines like "api/v1alpha1/ CRD
    type definitions...") to include a plaintext identifier (e.g., text) so the code fence renders and lints correctly; ensure only the first backtick fence is changed and the closing fence remains unchanged.

In @CLAUDE.md:

  • Line 3: Replace the nonstandard annotation '@AGENTS.md' in CLAUDE.md with a
    proper Markdown link or an explanatory comment; specifically locate the literal
    '@AGENTS.md' token and either change it to a Markdown link like
    AGENTS.md or, if it is tool-specific, add a short inline comment
    explaining the syntax and its purpose so readers know why it isn't standard
    Markdown.

In @docs/security-guidelines.md:

  • Around line 51-55: The markdown fenced code block showing the regex for
    disallowedLabelMatcher (in install_external_secrets.go) needs proper formatting:
    add a blank line before and after the fence and include a language identifier
    (e.g., "regex") on the opening fence so the block renders correctly; update the
    docs/security-guidelines.md block accordingly around the regex snippet for
    disallowedLabelMatcher.

Nitpick comments:
In @CLAUDE.md:

  • Around line 9-51: Add a blank line before and after each Markdown heading and
    before and after each fenced code block in CLAUDE.md (e.g., the "Before
    Committing", "Development Workflow", "Testing", "Dependency Management", and
    "Claude Code Preferences" headings and their bash fences) so the file
    complies with MD022 and MD031; specifically, ensure there is an empty line
    separating the heading from the previous paragraph and an empty line between the
    fenced code opening/closing lines and surrounding text throughout the file.

In @docs/api-contracts-guidelines.md:

  • Line 23: Update the markdown for docs/api-contracts-guidelines.md by adding a
    language specifier to the code fence at the shown code block (e.g., change togo) and ensure there is a blank line before and after that fenced code
    block; also add a blank line before and after each top-level heading referenced
    in the review (the headings at the noted locations) so headings are separated
    from surrounding paragraphs and lists for consistent markdownlint-compliant
    formatting.

In @docs/performance-guidelines.md:

  • Around line 1-93: Add a single blank line after each level-3 Markdown heading
    that currently runs straight into content so headings follow the "blank line
    below headings" convention; specifically insert a blank line after the headings
    "### Manager-Level Label-Filtered Cache", "### Uncached Client Usage", "###
    Conditional CRD Cache Registration", "### Predicate Strategy by Resource Type",
    "### Map Function Convention", "### Error Classification and Requeue Strategy",
    "### Condition Update Optimization", "### CR Annotation Patching", "###
    UpdateWithRetry Pattern", "### Status Update Pattern", "### Bootstrap Resource
    Creation", "### Resettable sync.Once (common.Now)", "### HasObjectChanged
    Pattern", and "### Asset Decoding" in the document so each heading is followed
    by one empty line before its paragraph content.
  • Around line 5-21: The doc references a hard-coded line number ("line ~68" in
    controller.go); replace that brittle reference with a resilient identifier such
    as the constant or symbol name (e.g., controllerManagedResources) and/or a
    contextual location (e.g., "the resource list near NewCacheBuilder() /
    buildCacheObjectList() in pkg/controller/external_secrets/controller.go") so
    readers can find where to register new resources without relying on line
    numbers.

In @docs/testing-guidelines.md:

  • Around line 17-113: The Markdown file has multiple headings without
    surrounding blank lines (violating MD022); fix by inserting a single blank line
    before and after each heading token (e.g., the "### Conventions", "### Fake
    Client Pattern", "### Test Helpers", "### Error Assertion", "### Adding a New
    Unit Test", "## API Integration Tests (test/apis/)", "### Data-Driven Test
    Suites", "### envtest Setup", "### Running", "### Adding a New API Test", "##
    E2E Tests (test/e2e/)", "### Build Tag", "### Label-Based Platform Selection",
    "### E2E Structure", "### Test Data", "### E2E Test Utilities (test/utils/)",
    "### Adding a New E2E Test") so each heading is preceded and followed by exactly
    one blank line to satisfy lint MD022 and improve readability.

</details>

<details>
<summary>🪄 Autofix (Beta)</summary>

Fix all unresolved CodeRabbit comments on this PR:

- [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)
- [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Repository: openshift/coderabbit/.coderabbit.yaml

**Review profile**: CHILL

**Plan**: Enterprise

**Run ID**: `088f4b9d-3b92-48d9-a894-246e50996f77`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between e9969c3b3dbb343ccdc9e781d9feffd549b74d71 and 13849aa8957958b3770a70ca98889d060d8ee63a.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `AGENTS.md`
* `CLAUDE.md`
* `docs/api-contracts-guidelines.md`
* `docs/error-handling-guidelines.md`
* `docs/integration-guidelines.md`
* `docs/performance-guidelines.md`
* `docs/security-guidelines.md`
* `docs/testing-guidelines.md`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment thread AGENTS.md
Comment on lines +28 to +49
```
api/v1alpha1/ CRD type definitions, conditions, shared types, deepcopy
api/v1alpha1/tests/ Declarative YAML test suites for CRD validation
bindata/ Static operand YAML manifests (compiled into Go via go-bindata)
cmd/ Operator entrypoint (main.go)
config/ Kustomize manifests (CRDs, RBAC, manager, samples, bundle)
hack/ Shell scripts (codegen, verification, CI helpers)
images/ci/ CI Dockerfiles (coverage-instrumented builds)
pkg/controller/ Controller implementations
client/ CtrlClient interface + counterfeiter fakes
common/ Shared utilities (errors, constants, decode helpers, drift detection)
commontest/ Shared test fixtures (TestExternalSecretsConfig, TestExternalSecretsManager)
crd_annotator/ CRD annotation controller
external_secrets/ Main operand reconciliation controller
external_secrets_manager/ Status aggregation controller
pkg/operator/ Manager setup, controller registration
pkg/version/ Build-time version info (ldflags)
test/apis/ API integration tests (Ginkgo + envtest)
test/e2e/ End-to-end tests (Ginkgo + live cluster)
test/utils/ E2E test helpers
tools/ Go module for build-time tool dependencies
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifier to the code fence.

The directory structure code block should specify a language identifier (e.g., text or plaintext) for proper rendering and linting compliance.

📝 Proposed fix
-```
+```text
 api/v1alpha1/           CRD type definitions, conditions, shared types, deepcopy
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 28 - 49, The fenced directory-listing block in
AGENTS.md is missing a language identifier; update the opening triple-backticks
that precede the directory list (the block containing lines like "api/v1alpha1/ 
CRD type definitions...") to include a plaintext identifier (e.g., ```text) so
the code fence renders and lints correctly; ensure only the first backtick fence
is changed and the closing fence remains ``` unchanged.

Comment thread CLAUDE.md
@@ -0,0 +1,51 @@
# CLAUDE.md

@AGENTS.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify or remove the @AGENTS.md annotation.

The @AGENTS.md syntax is not standard Markdown. If this is intended as a reference or link, use a proper Markdown link: [AGENTS.md](AGENTS.md). If it's meant for a specific tool or extension, add a comment explaining the syntax.

🔗 Proposed fix
 # CLAUDE.md
 
-@AGENTS.md
+See [AGENTS.md](AGENTS.md) for comprehensive architectural details.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@AGENTS.md
# CLAUDE.md
See [AGENTS.md](AGENTS.md) for comprehensive architectural details.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` at line 3, Replace the nonstandard annotation '`@AGENTS.md`' in
CLAUDE.md with a proper Markdown link or an explanatory comment; specifically
locate the literal '`@AGENTS.md`' token and either change it to a Markdown link
like [AGENTS.md](AGENTS.md) or, if it is tool-specific, add a short inline
comment explaining the syntax and its purpose so readers know why it isn't
standard Markdown.

Comment on lines +51 to +55
The regex `disallowedLabelMatcher` in `install_external_secrets.go` prevents users from overriding internal labels via `ControllerConfig.Labels`:
```
^app.kubernetes.io\/|^external-secrets.io\/|^rbac.authorization.k8s.io\/|^servicebinding.io\/controller$|^app$
```
When adding new internal labels, add them to this regex.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix markdown formatting around the code fence.

The fenced code block needs blank lines before and after, and should specify a language identifier for proper rendering.

📝 Proposed fix
 When adding new internal labels, add them to this regex.
+
-```
+```regex
 ^app.kubernetes.io\/|^external-secrets.io\/|^rbac.authorization.k8s.io\/|^servicebinding.io\/controller$|^app$

When adding new internal labels, add them to this regex.

</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 52-52: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

---

[warning] 52-52: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

[warning] 54-54: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/security-guidelines.md around lines 51 - 55, The markdown fenced code
block showing the regex for disallowedLabelMatcher (in
install_external_secrets.go) needs proper formatting: add a blank line before
and after the fence and include a language identifier (e.g., "regex") on the
opening fence so the block renders correctly; update the
docs/security-guidelines.md block accordingly around the regex snippet for
disallowedLabelMatcher.


</details>

<!-- fingerprinting:phantom:triton:puma -->

<!-- cr-comment:v1:f609374c70c42445ee95a6b7 -->

_Source: Linters/SAST tools_

<!-- This is an auto-generated comment by CodeRabbit -->

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

@siddhibhor-56: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 13849aa link true /test verify

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

1 participant