Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
96 changes: 96 additions & 0 deletions openhands/usage/use-cases/accessibility.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: Audit Accessibility
description: Check web applications for WCAG accessibility compliance
automation:
icon: universal-access
summary: >-
Identify accessibility barriers and implement fixes for WCAG compliance.
---

<Card
title="View Accessibility Audit Skill"
icon="github"
href="https://github.com/OpenHands/extensions/tree/main/skills/audit-accessibility"
>
Check out the accessibility audit skill.
</Card>

Web accessibility ensures your application works for everyone, including users with disabilities. WCAG compliance is often a legal requirement. OpenHands can audit your code for accessibility issues and implement fixes.

## WCAG Coverage

### Perceivable
- Alt text for images
- Captions for videos
- Sufficient color contrast
- Text resizing support

### Operable
- Keyboard accessibility
- Focus indicators
- No keyboard traps
- Skip navigation

### Understandable
- Language declaration
- Clear error messages
- Consistent navigation
- Form labels

### Robust
- Valid HTML
- Correct ARIA usage
- Assistive technology compatibility

## How to Use

```
/audit-accessibility

Check the application for WCAG 2.1 AA compliance.
Focus on form components and navigation.
```

## Example Findings

```markdown
## Accessibility Audit

### Critical
- **Missing alt text**: 12 images without descriptions
- Fix: Add descriptive alt attributes

### Serious
- **Low contrast**: Button text at 2.5:1 ratio
- Requires: 4.5:1 for normal text
- Fix: Change color from #888 to #595959

### Moderate
- **Missing form labels**: 3 inputs without labels
- Fix: Add associated <label> elements

### Minor
- **Missing lang attribute**: <html> element
- Fix: Add lang="en" attribute
```

## Quick Fixes

**Missing alt text**:
```html
<!-- Before -->
<img src="chart.png">

<!-- After -->
<img src="chart.png" alt="Sales increased 25% in Q2">
```

**Missing form labels**:
```html
<!-- Before -->
<input type="email" placeholder="Email">

<!-- After -->
<label for="email">Email</label>
<input type="email" id="email" placeholder="Email">
```
116 changes: 116 additions & 0 deletions openhands/usage/use-cases/architecture-review.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
title: Architecture Review
description: Evaluate system architecture for scalability, maintainability, and best practices
automation:
icon: sitemap
summary: >-
Review codebase architecture and get recommendations for improvements.
---

<Card
title="View Architecture Review Skill"
icon="github"
href="https://github.com/OpenHands/extensions/tree/main/skills/architecture-review"
>
Check out the architecture review skill.
</Card>

Good architecture is the foundation of maintainable software. But architecture reviews are often skipped due to time pressure, or limited to informal discussions that miss important issues. OpenHands can provide systematic architecture analysis that identifies problems and suggests improvements.

## The Challenge

Architecture problems compound over time:

- **Technical debt accumulates**: Small shortcuts become major obstacles
- **Scalability surprises**: Systems that worked at 100 users fail at 10,000
- **Maintainability degrades**: Code becomes harder to change
- **Knowledge silos form**: Only certain people can work on certain parts

## Architecture Review with OpenHands

OpenHands evaluates architecture across multiple dimensions:

- **Code organization**: Module boundaries, coupling, cohesion
- **Scalability**: Bottlenecks, state management, resource usage
- **Maintainability**: Complexity hotspots, test coverage, documentation

Check warning on line 35 in openhands/usage/use-cases/architecture-review.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/architecture-review.mdx#L35

Did you really mean 'hotspots'?
- **Security**: Attack surface, data flow, trust boundaries

## How to Use

```
/architecture-review

Analyze the architecture of this codebase:
- Identify scalability concerns
- Find high-coupling areas
- Suggest refactoring priorities
```

## Review Areas

### Code Organization

- Clear module boundaries
- Proper layer separation
- Minimal circular dependencies
- Consistent naming conventions

### Scalability

- Stateless design where possible
- Efficient database access patterns
- Caching strategies
- Horizontal scaling readiness

### Maintainability

- Code complexity (cyclomatic complexity)

Check warning on line 67 in openhands/usage/use-cases/architecture-review.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/architecture-review.mdx#L67

Did you really mean 'cyclomatic'?
- Test coverage gaps
- Documentation completeness
- Onboarding difficulty

### Security

- Trust boundaries
- Authentication/authorization patterns
- Data encryption approach
- Dependency security

## Example Output

```markdown
## Architecture Review Summary

### Strengths
- Clean separation between API and business logic
- Good test coverage in core modules (85%)
- Consistent error handling patterns

### Concerns

**High Priority**
1. **Database coupling**: Business logic directly queries DB in 12 places
- Recommendation: Introduce repository pattern
- Effort: Medium

2. **Scaling bottleneck**: User session stored in memory
- Recommendation: Move to Redis or similar
- Effort: Low

**Medium Priority**
3. **Circular dependency**: auth ↔ users modules
- Recommendation: Extract shared types to common module
- Effort: Low

### Metrics
- Cyclomatic complexity: 3.2 avg (good)
- Module coupling: 0.4 (acceptable)
- Test coverage: 72% (room for improvement)
```

## Best Practices

- Run architecture reviews quarterly
- Focus on high-risk areas first
- Create actionable tickets from findings
- Track metrics over time
72 changes: 72 additions & 0 deletions openhands/usage/use-cases/clean-logs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Clean Up Logs
description: Improve application logging for better observability and debugging
automation:
icon: file-lines
summary: >-
Remove log noise, fix log levels, and add structured context for better debugging.
---

<Card
title="View Logging Cleanup Skill"
icon="github"
href="https://github.com/OpenHands/extensions/tree/main/skills/clean-logs"
>
Check out the logging improvement skill.
</Card>

Good logging is essential for debugging production issues. Bad logging—too much noise, wrong levels, missing context—makes debugging harder. OpenHands can analyze your logging and improve it for better observability.

## Common Issues

### Log Level Problems
- Debug logs polluting production
- Errors logged as warnings
- Missing error logs for failures

### Missing Context
- No request/correlation IDs
- Errors without stack traces
- Missing user context

### Noise
- Logging in hot paths
- Duplicate messages
- Logging sensitive data

## How to Use

```
/clean-logs

Review the logging in this codebase and improve it:
- Fix incorrect log levels
- Add missing context
- Remove unnecessary noise
```

## Example Improvements

**Before**: Missing context
```python
logger.error("Request failed")
```

**After**: Structured logging with context
```python
logger.error("Request failed",
extra={
"request_id": request.id,
"user_id": user.id,
"endpoint": request.path,
"error_type": type(e).__name__
})
```

## Best Practices

- Use structured logging (JSON)
- Include correlation IDs
- Log at appropriate levels
- Redact sensitive data
- Make logs searchable
94 changes: 94 additions & 0 deletions openhands/usage/use-cases/discover-vulnerabilities.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Discover Vulnerabilities
description: Proactively scan codebases to find security vulnerabilities before exploitation
automation:
icon: magnifying-glass
summary: >-
Scan for security issues including dependency CVEs, secrets, and code vulnerabilities.
---

<Card
title="View Vulnerability Discovery Skill"
icon="github"
href="https://github.com/OpenHands/extensions/tree/main/skills/discover-vulnerabilities"
>
Check out the vulnerability discovery skill.
</Card>

Security vulnerabilities exist in every codebase. The question is whether you find them before attackers do. OpenHands can proactively scan your code for vulnerabilities, from known CVEs in dependencies to hardcoded secrets and insecure patterns.

Check warning on line 18 in openhands/usage/use-cases/discover-vulnerabilities.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/discover-vulnerabilities.mdx#L18

Did you really mean 'CVEs'?

Check warning on line 18 in openhands/usage/use-cases/discover-vulnerabilities.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/discover-vulnerabilities.mdx#L18

Did you really mean 'hardcoded'?

## What Gets Scanned

### Dependency Vulnerabilities
- Known CVEs in direct dependencies

Check warning on line 23 in openhands/usage/use-cases/discover-vulnerabilities.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/discover-vulnerabilities.mdx#L23

Did you really mean 'CVEs'?
- Transitive dependency vulnerabilities
- Outdated packages with security fixes

### Code Vulnerabilities
- Injection flaws (SQL, command, XSS)
- Insecure deserialization

Check warning on line 29 in openhands/usage/use-cases/discover-vulnerabilities.mdx

View check run for this annotation

Mintlify / Mintlify Validation (allhandsai) - vale-spellcheck

openhands/usage/use-cases/discover-vulnerabilities.mdx#L29

Did you really mean 'deserialization'?
- Path traversal
- Server-side request forgery

### Secrets Detection
- API keys and tokens
- Passwords and credentials
- Private keys
- Connection strings

### Configuration Issues
- Default credentials
- Debug mode enabled
- Permissive CORS
- Missing security headers

## How to Use

```
/discover-vulns

Scan this repository for security vulnerabilities.
Focus on the authentication module and API endpoints.
```

## Example Output

```markdown
## Vulnerability Scan Results

### Critical (1)
- **CVE-2023-12345**: Remote code execution in lodash < 4.17.21
- Location: package.json (transitive via old-package)
- Fix: Update old-package to 2.0.0+

### High (2)
- **Hardcoded API Key**: AWS access key found
- Location: src/config.js:15
- Fix: Move to environment variable

- **SQL Injection**: Unsanitized user input
- Location: src/api/users.py:45
- Fix: Use parameterized queries

### Medium (3)
- Missing rate limiting on /api/login
- Debug mode enabled in production config
- Permissive CORS policy

### Summary
- 6 vulnerabilities found
- 1 critical, 2 high, 3 medium
- Estimated fix time: 4 hours
```

## Automation

Run scans on every PR and on a schedule:

```yaml
name: Security Scan
on:
pull_request:
schedule:
- cron: '0 0 * * 1' # Weekly
```
Loading
Loading