Most engineering teams assume something that is not actually true.
They believe they can restrict access to specific folders inside a repository.
In practice, they cannot.
On platforms like GitHub and GitLab, permissions are granted at the repository level. If a user can access the repository, they can see the entire directory tree.
That works fine for small teams.
It breaks down in monorepos.
The Folder Access Myth
Most engineering teams assume something that is not actually true.
They believe they can restrict access to specific folders inside a repository.
In practice, they cannot.
On platforms like GitHub and GitLab, permissions are granted at the repository level. If a user can access the repository, they can see the entire directory tree.
That works fine for small teams.
It breaks down in monorepos.
Where the Risk Begins
In a monorepo, folders often represent:
But the permission model does not recognize folders as security boundaries.
It recognizes only the repository.
That means a contractor working on one feature can technically browse everything else.
Even if they never misuse it, the exposure exists.
And exposure is risk.
Why Splitting Repos Is Not the Answer
To avoid overexposure, many organizations split their monorepo into smaller repositories.
This creates:
You end up redesigning architecture to compensate for a permission limitation.
That is not sustainable.
The Governance Gap
The real issue is structural.
Git was designed around the repository as the smallest control unit.
Modern organizations, however, organize work by directories within a shared repository.
There is a mismatch between how code is structured and how access is controlled.
As companies scale, this mismatch grows into a governance gap.
Why It Matters
Security frameworks emphasize least privilege.
People should only see what they need to do their job.
In many growing engineering organizations, that principle is quietly violated every day.
Not because teams are careless.
But because the tools were never built for directory level isolation.
If your monorepo is growing, the question is simple:
Are you scaling your architecture with control?
Or are you scaling your risk along with it?