Skip to content

Commit 490fd3d

Browse files
committed
fix: restore Julia (.jl) support accidentally removed, list DB ports explicitly
The previous commit on this branch was built from a local main that predated the Julia (.jl) support merge (#501), so restoring stashed changes onto a freshly-branched, up-to-date main silently replaced the newer .jl allowlist entry, its system_rules.json mapping, and its allowed_ext_test.go / system_rules_test.go cases with the stale pre-Julia state instead of adding Bicep alongside them. Restores every removed Julia entry (allowlist, TestIsExcludedPath cases, system_rules.json mapping, and both test files) so this is now a pure addition of Bicep support, not a replacement of Julia support. Also lists common database ports (MySQL/3306, PostgreSQL/5432, SQL Server/1433, MongoDB/27017) explicitly in bicep.md's sensitive-port clause per review feedback.
1 parent b6ce529 commit 490fd3d

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎internal/config/allowlist/allowed_ext_test.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ func TestIsAllowedExt(t *testing.T) {
3232
{".GRAPHQL", true},
3333
{".gql", true},
3434
{".GQL", true},
35+
{".jl", true},
36+
{".JL", true},
3537
{".bicep", true},
3638
{".BICEP", true},
3739
{".txt", false},
@@ -108,6 +110,11 @@ func TestIsExcludedPath(t *testing.T) {
108110
{"ets test file", "entry/src/test/Component.test.ets", true},
109111
{"ets non-test", "entry/src/main/Component.ets", false},
110112

113+
// Julia test files
114+
{"julia test file", "test/runtests.jl", true},
115+
{"julia test nested", "MyPkg/test/unit/foo.jl", true},
116+
{"julia non-test", "src/model.jl", false},
117+
111118
// Case insensitive
112119
{"case insensitive go", "Foo/Bar_Test.go", true},
113120
{"case insensitive java", "com/FooTEST.java", true}, // lowercase → "com/footest.java" matches "**/*test.java"

‎internal/config/allowlist/supported_file_types.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
".tf",
7373
".graphql",
7474
".gql",
75+
".jl",
7576
".bicep"
7677
]

‎internal/config/rules/rule_docs/bicep.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#### Overly Permissive Access
1212
- A `Microsoft.Authorization/roleAssignments` resource granting a broad built-in role (`Owner`, `Contributor`) at subscription or resource-group scope where a narrower, resource-scoped or custom role would suffice, especially when sibling assignments in the same file use narrower scopes
13-
- A network security group rule (`Microsoft.Network/networkSecurityGroups/securityRules`) with `sourceAddressPrefix` set to `*`/`Internet`/`0.0.0.0/0` on a sensitive port (SSH/22, RDP/3389, database ports) or on all ports (`destinationPortRange: '*'`)
13+
- A network security group rule (`Microsoft.Network/networkSecurityGroups/securityRules`) with `sourceAddressPrefix` set to `*`/`Internet`/`0.0.0.0/0` on a sensitive port (SSH/22, RDP/3389, or a database port such as MySQL/3306, PostgreSQL/5432, SQL Server/1433, MongoDB/27017) or on all ports (`destinationPortRange: '*'`)
1414
- A storage account, key vault, or SQL server resource with `publicNetworkAccess` explicitly set to `'Enabled'` (or left at a default that resolves to public) alongside no compensating `networkAcls`/private-endpoint configuration elsewhere in the same file
1515

1616
#### Insecure Resource Defaults

‎internal/config/rules/system_rules_test.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ func TestResolve_DefaultRules(t *testing.T) {
9292
{"i18n/app.pot", "Header Integrity"},
9393
{"api/schema.graphql", "Breaking Changes"},
9494
{"queries/user.gql", "Breaking Changes"},
95+
{"src/model.jl", "Type Stability"},
96+
{"MyPkg/src/solver.jl", "Type Stability"},
9597
{"infra/main.bicep", "Hardcoded Secrets"},
9698
}
9799

0 commit comments

Comments
 (0)