# Repository basics

Good issue forms get you the version, the logs and the setup on the first try. Closing what you fix tells users which problems are gone.

Source: https://ha-barkley.github.io/security/controls/repository/

From HASC, the Home Assistant Security Controls for integrations, cards and apps. A community catalog, not an official Home Assistant or Open Home Foundation project.

Each control has an ID, cited as HASC-CI-4, and a level from 1 to 3. "Level marker" means anyone can check the control from outside the project, and levels are graded on those controls only.

> **From the 2026 sweep.** Of the 2,612 apps with open issues that were old enough to judge, 306 (11.7%) have never closed one, so their users can't tell what's fixed. The [Marketplace report](https://ha-barkley.github.io/marketplace/2026/apps-that-went-quiet/) has more on this.

## Controls

### REPO-1: Add a bug report form

*Level 1*

`.github/ISSUE_TEMPLATE/bug_report.yml`

```
name: Bug report
description: Something isn't working
labels: [bug]
body:
  - type: input
    id: version
    attributes:
      label: App version
      placeholder: "1.4.2"
    validations:
      required: true
  - type: input
    id: ha-version
    attributes:
      label: Home Assistant version
      placeholder: "2026.11.2"
    validations:
      required: true
  - type: dropdown
    id: install
    attributes:
      label: Installation type
      options: [Home Assistant OS, Container, Other]
  - type: textarea
    id: what
    attributes:
      label: What happened, and what did you expect?
    validations:
      required: true
  - type: textarea
    id: logs
    attributes:
      label: Logs
      description: Remove tokens, passwords and addresses before pasting.
      render: shell
```

### REPO-2: Turn off blank issues and link the private report

*Level 1*

`.github/ISSUE_TEMPLATE/config.yml`

```
blank_issues_enabled: false
contact_links:
  - name: Report a security problem
    url: https://github.com/OWNER/REPO/security/advisories/new
    about: Please report security problems privately, not as an issue.
```

### REPO-3: Add a .gitignore

*Level 1*

**Add a .gitignore** before your first commit.

`.gitignore`

```
# Python
__pycache__/
*.py[cod]
.venv/
.pytest_cache/
.ruff_cache/
.coverage

# Node
node_modules/

# Secrets and local settings
.env
.env.*
secrets.yaml
*.pem
*.key

# Editors and OS
.idea/
.DS_Store
```

### REPO-4: Close issues with the fix

*Level 2*

Write `Fixes #123` in the pull request, and GitHub closes the issue when it merges. Close stale questions with a short note rather than leaving them open.

### REPO-5: List the servers your app talks to

*Level 1*

**List the servers your app talks to** in the README, and what it sends to each. Users can't see that from the dashboard.

### Check it worked

Click "New issue" on your repository. You should see the bug form and the security link, and no blank issue option.
