# Organizations

An organization owns repositories the way your own account does, but it can have several owners and one set of security settings that every new repository starts with.

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

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.** 307 of the 4,424 accounts that publish Marketplace apps (6.9%) are organizations. Among the 137 accounts with five or more apps, 17 are. The [Marketplace report](https://ha-barkley.github.io/marketplace/2026/accounts-and-reach/) has more on this.

These steps apply only if your project is in an organization. A project on a personal account can reach every level without one.

## When an organization helps

- More than one person works on the project.
- You publish several apps and want them all to start with the same settings.
- You might hand the project over one day. Changing who's in an organization is easier than transferring every repository.

If you maintain one app on your own, you don't need one. Start with [Your GitHub account](https://ha-barkley.github.io/security/controls/account/) instead.

## What you gain and what it costs

On the free plan, an organization gives you:

- Several owners, each with their own login, so nobody shares a password or a token.
- Two-factor login required for everyone in it.
- One security configuration that new repositories get automatically.
- One Actions policy for every repository, such as which actions may run and whether they must be pinned.
- Default community files, such as a security policy, from a single `.github` repository.

It has costs too.

- Rules for main and tags are still set in each repository. Organization-wide rulesets need a paid plan (Team or Enterprise).
- Moving an existing repository in has side effects. GitHub redirects the old address, but container images on ghcr.io don't follow, and the default security configuration isn't applied to a repository you move in.
- It's one more thing to protect. An owner can change or delete every repository in the organization.

## Controls

Do these in order, and finish the first five before you create or move any repositories into the organization. The default security configuration only reaches repositories created after you set it.

### ORG-1: Secure your own account first, then create the organization from it

*Level 1*

Settings → Organizations → New organization, on the free plan. Whoever holds an owner's login controls the organization, so do the steps in [Your GitHub account](https://ha-barkley.github.io/security/controls/account/) before this one.

### ORG-2: Require two-factor login for everyone

*Level 1*

In the organization's Settings → Authentication security, turn on the two-factor requirement. GitHub removes anyone who doesn't have it, and you can add them back once they've set it up.

### ORG-3: Decide who the owners are

*Level 1*

If you work alone, one owner is fine, but losing your login then means losing the organization. Keep your recovery codes offline and set up a second way to sign in. It also helps to write down who could take over. If others work with you, make two people you trust owners and everyone else a member.

### ORG-4: Limit what members can do

*Level 1*

In the organization's Settings, open Member privileges.

- Base permission: *Read*, which is the default. Give write access per repository instead.
- Repository creation: untick *Public* and *Private*, so only owners create repositories. Members can create both by default.
- Admin repository permissions: untick *Repository deletion and transfer*, so only owners can delete or move a repository.
- Pages creation: untick *Public*, so only owners can publish a website under the organization's name.

### ORG-5: Create a security configuration for every repository, new ones included

*Level 1*

In the organization's Settings, open Advanced Security → Configurations → New configuration. Most features start enabled. Change these:

- Name: your organization's name followed by "Baseline", such as "my-org Baseline".
- Dependabot alerts → Security updates: *Enabled*.
- Dependabot alerts → Malware alerts: *Enabled*.
- Policy → Use as default for newly created repositories: *Public*.
- Policy → Enforce configuration: keep *Enforce for repository owners*, so nobody can turn a feature off in one repository.

If several people have write access, also set Bypass privileges and each Prevent direct alert dismissals, so one person can't push a secret or dismiss an alert alone. Leave the rest as it starts.

Choose Save configuration. Saving doesn't apply it to the repositories you already have, so apply it next:

1. On the Configurations page, choose the pencil beside your new configuration.
2. Set Apply to: *All repositories*, and check that Allow repository owners to modify features is *Off*.
3. Choose Review, then Save and enable.

These features are free for public repositories. On a paid plan with GitHub Advanced Security, private repositories are billed per active committer, and the review screen shows how many licenses it would use. Choose *All* for new repositories only if you mean to pay for them. A repository you move in later needs the configuration applied by hand.

### ORG-6: Set an Actions policy

*Level 2*

Settings → Actions → General.

- Allow only actions created by GitHub, plus the ones you list, such as `home-assistant/*` and `hacs/*`.
- Turn on *Require actions to be pinned to a full-length commit SHA*. Workflows that use a tag or a branch, like `@v7` or `@main`, then fail, so pin them first and let Dependabot keep the SHAs current.
- Under Workflow permissions, choose read-only access, so a workflow without its own `permissions` block can't write.
- Untick *Allow GitHub Actions to create and approve pull requests*.

### ORG-7: If the organization holds several apps, add a public `.github` repository with default community files

*Level 1*

A `SECURITY.md` and `.github/ISSUE_TEMPLATE/config.yml` there show on every repository that doesn't have its own, and that `SECURITY.md` counts as each of those repositories' security policy for level 1. Use the files from [Security policy](https://ha-barkley.github.io/security/controls/security-policy/) and [Repository basics](https://ha-barkley.github.io/security/controls/repository/), with the organization's name in place of a single repository. Some tools only read a repository's own files, so the template below carries a copy too.

### ORG-8: If the organization holds several apps, start new ones from a template repository

*Level 2*

Add the files every new app should start with, then tick Settings → General → Template repository.

- `SECURITY.md`, issue forms and a `.gitignore` with secret patterns
- `.github/dependabot.yml` with a 7-day cooldown
- The security workflow from [Checks in CI](https://ha-barkley.github.io/security/controls/ci/), with actions pinned by SHA
- The release workflow from [Releases](https://ha-barkley.github.io/security/controls/releases/)

A template only copies files. Each new repository still needs its own rulesets for main and tags. Set them up once, export them (Settings → Rules → Rulesets, then Export on each ruleset), and import them into the next repository with New ruleset → Import a ruleset. The bypass list isn't exported, so add it again.

### ORG-9: If you move an existing repository in

*Level 1*

**If you move an existing repository in,** check what depends on its old address. GitHub redirects links, clones and the Marketplace's entry, but only until someone creates a repository with the old name. Container images on ghcr.io keep their old path, so update the image name in your app's config. Then apply the security configuration to the repository.

### Check it worked

Create a test repository from your template. Its Settings → Advanced Security page should show the organization's configuration, with Dependabot alerts, secret scanning, push protection, private reporting and CodeQL turned on. Its Security and quality tab should show the security policy while you're signed out. Delete the test repository afterwards.
