ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { expect, suite, test } from 'vitest';
import { URI } from '../../../../util/vs/base/common/uri';
import { convertFileTreeToChatResponseFileTree, listFilesInResponseFileTree } from '../../common/fileTreeParser';
/**
* Regression test for the "Create Workspace" path-traversal vulnerability.
*
* A malicious or prompt-injected model response could embed `..` segments in the
* generated markdown file tree. When the tree was copied into the user-selected
* parent folder, `path.relative` + `Uri.joinPath` resolved those segments and let
* the write escape the generated workspace folder (e.g. overwriting a sibling's
* `package.json`).
*
* The parser now drops any node whose name is a traversal/separator segment, so
* the escaping path is never produced. (A second, independent containment check
* in `createWorkspace` guards the actual file write as defense in depth.)
*/
suite('newWorkspace file tree traversal (PoC)', () => {
const generatePreviewURI = (filename
fileStructure
chatResponseTree fileStructure generatePreviewURI
files chatResponseTreevalue
file files
filenot
filenot
files
files
fileStructure
fileStructure generatePreviewURI