kin: KIN-INFRA-003 Исправить command injection через deploy_path в SSH-команде

This commit is contained in:
Gros Frumos 2026-03-17 18:24:02 +02:00
parent a4e5497401
commit e118b87a3e
2 changed files with 9 additions and 7 deletions

View file

@ -106,7 +106,7 @@ beforeEach(() => {
success: true, exit_code: 0, stdout: '', stderr: '', duration_seconds: 2,
} as any)
vi.mocked(api.createProjectLink).mockResolvedValue({
id: 1, from_project: 'KIN', to_project: 'BRS', link_type: 'depends_on', description: null, created_at: '2026-01-01',
id: 1, from_project: 'KIN', to_project: 'BRS', type: 'depends_on', description: null, created_at: '2026-01-01',
} as any)
vi.mocked(api.deleteProjectLink).mockResolvedValue(undefined as any)
})
@ -496,7 +496,7 @@ describe('ProjectView — Links таб', () => {
it('связи отображаются при links.length > 0', async () => {
const links = [
{ id: 1, from_project: 'KIN', to_project: 'BRS', link_type: 'depends_on', description: 'test', created_at: '2026-01-01' },
{ id: 1, from_project: 'KIN', to_project: 'BRS', type: 'depends_on', description: 'test', created_at: '2026-01-01' },
]
vi.mocked(api.projectLinks).mockResolvedValue(links as any)
const wrapper = await mountProjectView()
@ -505,9 +505,9 @@ describe('ProjectView — Links таб', () => {
expect(wrapper.text()).toContain('depends_on')
})
it('link_type и description отображаются для каждой связи', async () => {
it('type и description отображаются для каждой связи', async () => {
const links = [
{ id: 2, from_project: 'KIN', to_project: 'API', link_type: 'triggers', description: 'API call', created_at: '2026-01-01' },
{ id: 2, from_project: 'KIN', to_project: 'API', type: 'triggers', description: 'API call', created_at: '2026-01-01' },
]
vi.mocked(api.projectLinks).mockResolvedValue(links as any)
const wrapper = await mountProjectView()