Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
49c2456
Add Guardon self-assessment documentation
sajal-n Nov 27, 2025
49115fb
Add Guardon threat model documentation
sajal-n Nov 27, 2025
d9b005c
Add metadata.yaml for Guardon project details
sajal-n Nov 27, 2025
2993b8f
Update website and contact information
sajal-n Nov 27, 2025
39ea0d1
Update project website link format in self-assessment
sajal-n Nov 27, 2025
1e8f29b
Update contact email for vulnerability reporting
sajal-n Nov 28, 2025
dedcc76
Update maintainer email in metadata.yaml
sajal-n Nov 28, 2025
2deab87
Update last updated date in self-assessment document
sajal-n Nov 28, 2025
71ca187
Enhance Guardon self-assessment with feature details
sajal-n Nov 30, 2025
64858af
Revise Guardon self-assessment documentation
sajal-n Nov 30, 2025
1687cd7
Add system architecture section to self-assessment
sajal-n Dec 1, 2025
2617e85
Replace system architecture image in guardon self-assessment
sajal-n Dec 1, 2025
28f3ce0
Update threat model to reflect JS engine changes
sajal-n Dec 1, 2025
2a98ad6
Delete community/assessments/projects/guardon/metadata.yaml
sajal-n Dec 1, 2025
bc1e077
Add self-assessment for Guardon project
sajal-n Dec 1, 2025
ba4ceda
Delete community/assessments/projects/guardon/guardon-self-assessment.md
sajal-n Dec 1, 2025
0c2bbd8
Add STRIDE-based threat model for Guardon project
sajal-n Dec 1, 2025
4bfb633
Delete community/assessments/projects/guardon/guardon-threat-model.md
sajal-n Dec 1, 2025
cfb25d1
incorporating review comments
sajal-n Dec 1, 2025
78ae9ac
fixed linting issue
sajal-n Dec 2, 2025
6c17778
fixed linting
sajal-n Dec 2, 2025
0b3c4e1
fixed remaining issues
sajal-n Dec 2, 2025
f9ba0e7
fixed linting
sajal-n Dec 2, 2025
fa4bbc2
added my name to speling check ignore list
sajal-n Dec 2, 2025
a36f731
fixed error
sajal-n Dec 2, 2025
3c1d505
minor correction
sajal-n Dec 2, 2025
8105138
minor correction
sajal-n Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ci/spelling-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@
"Aurélie",
"Vache",
"Kanabar",
"Michaely"
"Michaely",
"guardon",
"Guardon",
"Sajal",
"Nigam",
"Sajal Nigam",
"guardon",
"Guardon"
]
}
33 changes: 33 additions & 0 deletions community/assessments/projects/guardon/DCO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Developer Certificate of Origin (DCO)

By contributing to this project, you agree to the Developer Certificate of Origin:

```text
Developer Certificate of Origin
Version 1.1

By making a contribution to this project, I certify that:

1. The contribution was created in whole or in part by me and I have the right to
submit it under the open source license indicated in the file;
2. The contribution is based upon previous work that, to the best of my knowledge,
is covered under an appropriate open source license and I have the right under
that license to submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless I am permitted to
submit under a different license), as indicated in the file;
3. The contribution was provided directly to me by some other person who certified
(1), (2) or (3) and I have not modified it.
4. I understand and agree that this project and the contribution are public and that
a record of the contribution (including all personal information I submit with
it, including my sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s) involved.
```

To sign off your commits, use the `--signoff` flag:

```sh
git commit --signoff
```

This will add a `Signed-off-by: Sajal Nigam <sajalnigam@gmail.com>` line to your
commit message, certifying your compliance with the DCO.
258 changes: 258 additions & 0 deletions community/assessments/projects/guardon/self-assessment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
# Guardon — CNCF TAG-Security Self-Assessment

**Project:** Guardon
**Type:** Browser-based Kubernetes YAML & Policy Validator
**Website:** [Guardon](https://chromewebstore.google.com/detail/jhhegdmiakbocegfcfjngkodicpjkgpb?utm_source=item-share-cb)
**Contact:** [sajalnigam@gmail.com](mailto:sajalnigam@gmail.com)
**Assessment Version:** v1.0
**Last Updated:** 2025-11-28

---

## 1. Project Overview

Guardon is a **fully client-side browser extension** (Chrome/Edge/Brave) that performs:

- **Instant Kubernetes YAML validation** — Flags security misconfigurations as you browse GitHub/GitLab, with no CI/CD required.

- **Schema-aware checks** — Validates manifests against uploaded Kubernetes OpenAPI/CRD schemas to ensure required fields and type safety.

- **Customizable rule engine** — Supports JSON-based rules and Kyverno policy import for organization-specific governance standards.

- **Multi-document YAML support** — Handles complex manifests containing multiple resources in a single file.

- **Actionable fix suggestions** — Generates copy-paste-ready YAML patches for every violation.

- **Dark mode UI** — Provides a seamless experience across day and night workflows.

- **Offline-first** — All validation runs fully locally in your browser with zero network calls.

- **Manual paste & validation** — Validate any YAML by pasting it directly into the extension popup, even outside GitHub/GitLab.

- **Enterprise-ready** — Import/manage custom rules, preview Kyverno policies, and enforce governance at organizational scale.

Guardon shifts Kubernetes security **far left**, helping developers identify misconfigurations
**before** they reach CI pipelines or clusters.
All validation happens locally inside the browser using **JavaScript**.
No backend, no cloud service, and **no user data ever leaves the machine**.

---

## 2. Security Boundary

Guardon has a strict and minimal security boundary:

- Runs entirely within browser WebExtension APIs
- No backend infrastructure
- No telemetry or analytics
- No transmission of YAML or policies to external systems
- Instead, Guardon converts Kyverno policies to its own internal rule format for validation in the browser
- No Kubernetes cluster access, no secrets, no tokens
- Only interacts with user-selected YAML files or GitHub/GitLab DOM content

**Trusted Computing Base (TCB):**

- Browser (Chrome/Brave/Edge)
- Guardon WebExtension JS/TS code
- Embedded Kyverno-rules engine
- Local storage for rules and configuration

---

## 3. Goals and Non-Goals

### **Goals**

- Detect Kubernetes misconfigurations early, at authoring time
- Enforce governance standards using Kyverno rules
- Provide deterministic and reproducible validation results
- Work entirely offline and locally
- Improve developer productivity by embedding checks inside workflow
- Offer zero-trust handling of user data (no outbound calls)

### **Non-Goals**

- Not a runtime security tool
- Not a replacement for PSP, PSA, Gatekeeper, or Kyverno in-cluster
- Not a network or API security solution
- Does not detect runtime attacks, malware, or CVEs
- Does not handle supply-chain validation outside YAML/policies
- Does not attest image provenance or signatures

---

## System Architecture

![Guardon Architecture](https://github.com/user-attachments/assets/765d980f-2fad-412a-b6d5-07252a46c462)

Guardon is built around four core modules:

### **1. Content Script**

- Injected directly into GitHub/GitLab pages
- Extracts Kubernetes YAML from PRs, files, and diffs
- Displays inline annotations and highlights misconfigurations

### **2. Validation Engine**

- Parses YAML and performs schema validation using `js-yaml`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you talk more about what this does for you? Just another sentence or so.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updating this line to add more context and make it simple. "Guardon uses js-yaml to convert raw YAML text into JavaScript objects, then checks these objects against Kubernetes schemas to ensure all required fields and types are correct before further rule validation"

- Evaluates JSON-based custom rules and imported Kyverno policies
- Generates actionable, copy-paste-ready fix suggestions for every issue

### **3. Background Service Worker**

- Manages cross-tab communication and extension lifecycle events
- Handles background tasks such as rule bundle loading and remote fetches
- Coordinates storage, caching, and sync of custom rules

### **4. Extension UI**

- Popup interface for instant YAML validation and fix previews
- Options page for rule import, export, and advanced customization
- Built-in rule editor for creating and managing custom rule bundles

---

## 5. Actors and Data Flow

### **Actors**

- **Developer**: Uses Guardon while browsing YAML on GitHub/GitLab
- **Browser**: Provides sandboxed execution environment
- **Local Guardon Engine**: Performs validation
- **Kyverno-JS**: Evaluates policies locally
- **Rule Sources**: User-imported Kyverno rules stored locally

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How does the user know how to make these? Are there defaults?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

First user has the flexibility to define there own kyverno rules/OpenAPI/CRD Schemas using the Options UI(stored in browser local storage). Then developers can simply use the Extension to validate any kubernetes yaml file on github or gitlab. This is all covered in Technical Documentation(Readme.md)


### **Data Flow Summary**

1. User views Kubernetes YAML on GitHub/GitLab
2. Guardon content script extracts YAML into memory
3. Data is sent to the Worker Engine (local only)
4. Worker evaluates schema + policies
5. Results returned to content script
6. Inline annotations displayed
7. No data is logged, stored externally, or transmitted

---

## 6. Critical Security Functions

### **Critical (Non-Configurable)**

- Kubernetes schema validation
- Local Kyverno-JS policy execution
- Secure sandboxing of rule engine

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

how?

- YAML isolation and strict parsing
- Immutable validation results

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kyverno policies are enforced locally in the browser’s sandbox, with each YAML parsed and validated in isolation. Validation results are read-only and cannot be changed after creation.

- No-network guarantee

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this enforced somehow? What if js-yaml or some other dependency violates this in a future version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Guardon’s architecture and policies minimize risk, but ongoing vigilance (dependency review, testing, and CSP enforcement) is required to ensure these guarantees remain intact as dependencies evolve. We can plan to use tools like jest-fetch-mock or custom spies to catch any unexpected network or data access.

- No access to browser cookies, tokens, or secrets
- Extension CSP preventing inline script execution
- Architecture and policies minimize dependency risk, but ongoing vigilance is required

### **Security-Relevant (Configurable)**

- Custom rule bundle imports
- Background fetch helper for related YAMLs
- Organization-specific governance packs
- Optional CIS/NIST best-practice packages

---

## 7. Threat Model (High-Level)

### Guardon mitigates

- Misconfigured workloads (privileged pods, hostPath, missing limits, etc.)
- RBAC over-permission
- Pod Security violations
- YAML structural errors
- Drift from organizational governance standards
- Incorrect multi-document YAML compositions
- Unsafe defaults (no resource limits, insecure capabilities)

### Guardon does NOT mitigate

- Runtime container escape
- Host/kernel compromise
- Image-level supply-chain attacks
- Network-level exploits
- Malicious browser extensions
- Insider threat or malicious developer intent
- Attacks on GitHub/GitLab itself

Full threat model available in `guardon-threat-model.md`.

---

## 8. Secure Development Practices

- Public source code on GitHub
- MIT License
- CI pipeline with:
- Static code analysis (ESLint)
- npm audit
- Automated dependency scanning
- Consistent and Auditable Build Process
- Release bundles signed with GitHub provenance
- Mandatory code review for PRs
- SECURITY.md published in repository

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What about OpenSSF best practice badging?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can definitely focus on getting this badge. it makes sense.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sounds good. Maybe add a mention here?

- Obtaining a OpenSSF badge is also on the roadmap

---

## 9. Vulnerability Reporting & Incident Response

**Contact:** [sajalnigam@gmail.com](mailto:sajalnigam@gmail.com)
**Policy:** SECURITY.md follows TAG-Security template

Incident handling workflow:

1. Triage and reproduce issue
2. Assign CVSS score
3. Apply patch in a protected branch
4. Issue temporary private release for reporters if needed
5. Public security advisory via GitHub Security Advisories
6. Patch release with clear changelog
7. Update community channels

Guardon follows a **90-day disclosure window** or faster if required.

---

## 10. Known Limitations

- Limited by GitHub/GitLab DOM stability
- Multi-GB YAML files not supported
- Will not detect runtime or CVE-level vulnerabilities
- No distributed policy cache (local only)
- Not compatible with Firefox yet (pending MV3 support)

---

## 11. Roadmap (Security-Focused)

- Signed rule packs
- Rule provenance verification
- In-extension SBOM viewer
- AI-assisted policy recommendations
- Support for JetBrains/VScode extensions
- Organization-managed rule registries
- Policy drift detection across repo

---

## Appendix

### Example Use Cases

- Detect privileged pod before code review
- Validate RBAC roles from GitHub UI
- Local evaluation of Kyverno policies before commits
- Quick governance compliance checks for microservices teams

### Example Policies

- “Disallow hostPath”
- “Require resource limits/requests”
- “Block privileged containers”
- “Prevent hostNetwork usage”
Loading