Skip to content

Commit 6239073

Browse files
committed
fix: strip git provider secrets from compose.one response
findComposeById embedded the full github/gitlab/bitbucket/gitea relations (client secrets, OAuth tokens, private keys, app passwords) and compose.one only used canEditDeployGitSource to set a hasGitProviderAccess flag, never to hide the fields — so any member with read access to a compose service got the connected git provider's raw credentials, regardless of their access to that provider itself. Exclude the same secret columns findApplicationById already excludes. Deploys are unaffected: the actual clone step always re-fetches the provider fresh by id (findGithubById/findGitlabById/...), it never reads secrets off the embedded relation.
1 parent a426140 commit 6239073

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

‎packages/server/src/services/compose.ts‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,24 @@ export const findComposeById = async (composeId: string) => {
125125
deployments: true,
126126
mounts: true,
127127
domains: true,
128-
github: true,
129-
gitlab: true,
130-
bitbucket: true,
131-
gitea: true,
128+
github: {
129+
columns: {
130+
githubClientSecret: false,
131+
githubPrivateKey: false,
132+
githubWebhookSecret: false,
133+
},
134+
},
135+
gitlab: {
136+
columns: { secret: false, accessToken: false, refreshToken: false },
137+
},
138+
bitbucket: { columns: { appPassword: false, apiToken: false } },
139+
gitea: {
140+
columns: {
141+
clientSecret: false,
142+
accessToken: false,
143+
refreshToken: false,
144+
},
145+
},
132146
server: true,
133147
backups: {
134148
with: {

0 commit comments

Comments
 (0)