Warehouse permission-based source code isolated development system

By decoupling source code reading permissions from development interface visibility, and utilizing an interface stub repository and a controlled remote build server, local development and analysis support is provided for developers without permissions. This resolves the conflict between source code security and development analysis, and enables the provision of complete compilation and testing capabilities without leaking the source code.

CN123179459APending Publication Date: 2026-11-27ZETIAN ZHIHANG ELECTRONIC TECHNOLOGY (SICHUAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611510251.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In software development scenarios involving multi-repository collaboration, the existing technology binds source code reading permissions to the visibility of development interfaces, resulting in developers without permissions lacking a local development and analysis environment. They cannot obtain complete code navigation and static analysis support, and cannot provide effective local development capabilities while ensuring source code security.

Method used

By decoupling source code reading permissions from development interface visibility, local development analysis support is provided through an interface stub repository, and real source code is assembled and executed in a controlled environment through a controlled remote build server, enabling developers without permissions to perform complete local development analysis.

Benefits of technology

Without granting source code reading permissions, it provides complete local development and analysis support for developers without such permissions, ensuring source code security and decoupling the local hybrid workspace from the remote real workspace.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179459A_ABST
    Figure CN123179459A_ABST
Patent Text Reader

Abstract

The application discloses a warehouse permission-based source code isolation development system and method. The system comprises: a real warehouse area configured on a version control platform; an interface stub warehouse area corresponding to the real warehouse area, retaining interface information but not containing implementation code; a developer workstation, cloning the real warehouse or the interface stub warehouse according to permission selection, combining multiple checkouts into a compilation work area according to an existing path for a development tool to complete navigation and static analysis, and sending a structured request containing no source code content through a client; and a controlled remote build server, combining real source code in an identity-isolated storage using preconfigured credentials, completing offline compilation and testing in a controlled isolated execution environment, and returning a result after output review. The application decouples source code reading permission and development interface visibility, decouples a local mixed work area and a remote complete real work area, and enables a developer without permission to obtain local development and analysis support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of software development collaboration and source code security management, and in particular to a source code isolation development system based on repository permissions. Background Technology

[0002] In multi-repository collaborative software development scenarios, when multiple teams jointly maintain a set of interdependent code repositories, developers need to obtain interface information from other repositories to complete code navigation, type completion, and static analysis.

[0003] In existing technologies, source code reading permissions and development interface visibility are typically tied together: developers with reading permissions can obtain the complete source code and compile it locally, while developers without reading permissions cannot obtain any interface information, losing their ability to develop and analyze locally, and can only rely on binary libraries or interface documentation provided by the maintainer for development. This binding relationship between permissions and visibility creates a fundamental contradiction: granting source code reading permissions can meet development and analysis needs, but leads to the exposure of protected implementation details; denying permission ensures source code security, but leaves collaborating developers without effective local development environment support.

[0004] There is currently no good solution to this problem. Summary of the Invention

[0005] To address the shortcomings of existing technologies where source code reading permissions are bound to development interface visibility, resulting in a lack of local development and analysis environment for developers without access rights, this application provides a source code isolation development system based on repository permissions. This system decouples source code reading permissions from development interface visibility and decouples the local hybrid workspace from the remote full-fledged workspace. This allows users without access rights to obtain a local static analysis experience through the interface stub repository, while the actual source code is only assembled and executed on a controlled server. This provides complete local development and analysis support for developers without access rights while ensuring source code security. Specifically, this application provides the following technical solutions: Firstly, this application provides a source code isolation development system based on repository permissions, including: The real repository area is configured on the version control platform and is used to control the reading and access of source code according to project permissions; The interface stub repository area corresponds to the real repository area and is used to retain interface information required for development and analysis. The interface stub repository area does not contain the protected implementation code in the real repository area. The developer workstation is used to select and clone the real repository in the real repository area or the corresponding interface stub repository in the interface stub repository area according to the permissions of the version control platform, and combine multiple checkout results into a compilation workspace; the developer workstation also includes a build client, used to send requests to a controlled remote build server, the requests satisfying structured request constraints; A controlled remote build server is used to assemble complete real source code based on a pre-configured real repository address and credentials, and complete offline compilation and testing; and to return the build diagnostics, test outputs and build artifacts to the developer workstation after output review.

[0006] Optionally, the controlled remote build server further includes: An isolated storage directory is constructed based on the derived values ​​of the identity identifier and the project identifier, wherein the isolated storage directories corresponding to different identity identifiers are not shared with each other; Concurrent access to the same isolated storage directory is serialized using exclusive locks.

[0007] Optionally, before performing offline compilation, the controlled remote build server performs a whitelist check on the build scripts and process macros in the dependency declaration, so that the build scripts and process macros in the whitelist participate in the compilation, and the build scripts or process macros not included in the whitelist are rejected.

[0008] Optionally, the output review includes: Apply a log size limit to the build diagnostics; A product size limit is imposed on the constructed product.

[0009] Optionally, the interface stub repository in the interface stub repository area retains the public interface signature and type definition of the real repository, and the function bodies and method bodies in the interface stub repository are replaced with stubs that do not contain implementation logic.

[0010] Secondly, this application provides a source code isolation development method based on repository permissions, applied to the aforementioned system, the method comprising: The cloning selection is performed on each repository according to the permissions of the version control platform. The cloning selection includes cloning the real repository for repositories with development permissions and cloning the corresponding interface stub repository for repositories without development permissions. Combine multiple detection results into a compilation workspace; The client sends a request to the controlled remote build server. After receiving the request, the controlled remote build server assembles the complete real source code and completes offline compilation and testing; it then performs output review on the build diagnostics, test outputs, and build artifacts before returning them to the developer's workstation.

[0011] Optionally, when performing a clone selection, the interface stub repository retains the public interface signature and type definition of the real repository, and the function bodies and method bodies in the interface stub repository are replaced with stubs that do not contain implementation logic.

[0012] Optionally, completing offline compilation and testing includes: Disconnect from network access before performing compilation and testing; Perform offline compilation and testing using pre-acquired dependencies.

[0013] Optionally, the output review includes: Apply a log size limit to the build diagnostics; A product size limit is imposed on the constructed product.

[0014] Thirdly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the operations of the aforementioned source code isolation development system based on repository permissions, or implements the aforementioned source code isolation development method based on repository permissions.

[0015] The beneficial effects of this application are as follows: 1. By setting up an interface stub repository area corresponding to the real repository area, developers without source code reading permissions can clone the interface stub repository and combine it with the real repository according to the existing path to form a compilation workspace, thereby obtaining support for navigation, completion and static analysis in local development tools, and solving the problem of binding source code reading permissions with the visibility of development interfaces. 2. By using a controlled remote build server, complete real source code is assembled in identity-isolated storage and compiled and tested in a controlled isolated execution environment. The server does not expose the real working area to the client, thus decoupling the local hybrid working area from the remote complete real working area. This provides developers with complete compilation and testing capabilities without granting source code reading permissions. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall architecture of a source code isolation development system based on repository permissions, provided in an embodiment of this application.

[0017] Figure 2 This is a schematic diagram of the permission model and trust boundary matrix of each region of the system provided in the embodiments of this application.

[0018] Figure 3 This is a schematic diagram of the main process of source code isolation development based on repository permissions, provided for an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0021] In multi-repository collaborative software development scenarios, multiple development teams jointly maintain a set of interdependent code repositories. These code repositories include repositories at different levels, such as application-layer business logic repositories, basic framework repositories, and common component libraries. The repositories establish compile-time coupling relationships through interface declarations and path dependencies.

[0022] The source code isolation development system and method based on repository permissions provided in this application are applicable to scenarios that require providing local development and analysis support to developers without permissions while ensuring source code security. The system can be deployed in enterprise internal development environments, cloud development platforms, distributed team collaboration platforms, etc., and the developer workstation can be any of a desktop computer, laptop computer, thin client terminal, or cloud development container.

[0023] For example, in a typical enterprise multi-team collaboration scenario, Team A is responsible for maintaining the basic framework repository, Team B is responsible for maintaining the application layer business logic repository, and Team C is responsible for maintaining the common component library. Developers in Team B need to call public functions in the basic framework repository and the common component library when writing application layer code, but they do not need to, and should not, obtain the implementation code of these two repositories.

[0024] In existing technologies, developers in Team B must wait for Teams A and C to release compiled binary libraries or interface documentation before they can begin development. In the solution of this application, developers in Team B can obtain complete interface information locally and perform code writing and static analysis by cloning the interface stub repositories corresponding to the basic framework repository and the public component library. Compilation and testing operations are completed through the controlled remote build server. This eliminates the dependence on binary library releases and interface documentation maintenance, allowing developers in Team B to perform development work synchronously as Teams A and C continue to iterate.

[0025] Example 1 like Figures 1-2 As shown in the illustration, the source code isolation development system based on repository permissions provided in this application includes a real repository area, an interface stub repository area, a developer workstation, and a controlled remote build server. These four areas work collaboratively via a network connection. The real repository area and the interface stub repository area are located on the version control platform side, the developer workstation is located in the developer's local environment, and the controlled remote build server is located in a controlled server-side environment. The developer workstation communicates with the version control platform via a version control protocol, and the developer workstation communicates with the controlled remote build server via a structured request protocol.

[0026] In this embodiment, the real repository area is configured on a version control platform.

[0027] The version control platform is a GitLab instance, and the read access to the source code of each real repository in the real repository area is controlled by GitLab's project permission model. The GitLab instance is one specific implementation of the version control platform; in another embodiment, the version control platform can also be implemented through a separately deployed Git server. Both can control repository read permissions at the project level. Each real repository corresponds to an independent GitLab project, and the project's visibility level and member roles determine the developer's read permissions for the repository's source code.

[0028] Generally, developers with the Developer role or higher can obtain full source code reading permissions for the real repository, while developers without this role cannot directly access the source code content in the real repository.

[0029] The version control platform's permission model divides the repository into at least two access levels: a full read level and a no-read level.

[0030] The full read access level allows developers to clone, pull, and browse all files in the real repository; developers without a read access level cannot see any file content in the real repository on the version control platform, and the version control platform hides or displays them as having no access in the repository list. The granularity of the permission model is at the repository level, and the same developer can have different access levels in different repositories.

[0031] The interface stub repositories in the interface stub repository area correspond one-to-one with the real repositories in the real repository area. In this embodiment, the interface stub repository is a stub repository. Each stub repository retains the public interface signature and type definition of the corresponding real repository, and the function bodies and method bodies in the stub repository are replaced with stubs that do not contain implementation logic.

[0032] For example, for a public function declaration `pub fn calculate_hash(data:&[u8]) ->u64` in the real repository, the corresponding stub repository retains the complete function signature and return type declaration. The function body is replaced with a stub containing only a type placeholder return value, such as an `unimplemented!()` macro call or a zero-value return. The stub repository does not contain the protected implementation code from the real repository; it only retains the interface information needed for development and analysis, enabling developers without source code access permissions to obtain interface-level information such as function signatures, type definitions, and trait declarations through the stub repository.

[0033] In another embodiment, the interface stub repository can also be generated by retaining trait definitions and type aliases, while only retaining the interface contracts at the type system level and omitting all function implementations.

[0034] The scope of interface reservations for the Stub repository includes the following categories: Publicly expose function signatures along with their parameter and return types, publicly expose struct field definitions and associated method signatures, publicly expose variant definitions of enumeration types, publicly expose trait declarations along with their associated types and default method signatures, and publicly expose type aliases and constant definitions. The Stub repository does not retain private functions, private struct fields, implementation details of internal modules, or code segments used only for testing in conditional compilation.

[0035] It should be noted that the directory structure of the stub repository is consistent with that of the real repository, including the module hierarchy and file organization, enabling the stub repository to replace the real repository in path dependency resolution within the build workspace. The manifest file in the stub repository retains the package name, version number, and external dependency declarations from the real repository's manifest file, allowing the build workspace to correctly identify the stub repository as a dependency package.

[0036] In this embodiment, the applicability of the interface stub repository is limited by the following: the stubs in the repository do not possess runtime behavior. Although the compilation workspace can be compiled locally, the generated executable program will trigger abnormal termination or return a placeholder value when calling the stub function at runtime, making it unusable for functional verification. Test cases containing stubs also cannot obtain meaningful test results. Therefore, the compilation workspace is suitable for static analysis and code navigation locally, but not for runtime verification and functional testing. Compilation and testing operations that require obtaining real runtime results are executed by the controlled remote build server in an environment that uses only real repositories.

[0037] The generic function signatures in the stub repository preserve generic parameters and their trait constraint declarations, enabling the development tool to perform type checking on generic calls. The procedural macro dependencies in the stub repository are declared as stub dependencies, preserving the macro's name and input / output type signatures. The development tool can recognize the existence of macro calls but does not expand the macro's actual logic.

[0038] Furthermore, the version correspondence between the interface stub repository and the real repository is maintained through version tags. Each version tag in the interface stub repository corresponds to a specific commit in the real repository. When the administrator performs a pull baseline update on the controlled remote build server, they determine the pull target commit for each real repository according to the version tag correspondence, ensuring that the real source code version on the controlled remote build server corresponds to the version tag in the interface stub repository. This ensures that the interface information on the developer's workstation and the real source code on the server remain consistent at the interface level.

[0039] When the public interface of the real repository changes, the interface stub repository must be updated synchronously to reflect the new interface signature and type definition. An outdated interface stub repository may cause the development tools to provide outdated interface information. The maintenance of the version correspondence can be performed manually by the administrator or assisted by automated tools.

[0040] The developer workstation is used to perform local development and analysis operations. Developers select which repositories to clone based on the permissions of the version control platform: for repositories with development permissions, the real repository in the real repository area is cloned; for repositories without development permissions, the corresponding interface stub repository in the interface stub repository area is cloned.

[0041] For example, when a developer is only responsible for repository A, the developer's workstation clones the actual repository of repository A, as well as the stub repositories of repositories B and C; the remote server uses all the actual repositories of repositories A, B, and C. The developer does not have the actual repository credentials on the server, nor does he / she receive the actual source code of repositories B and C.

[0042] It should be noted that the system is applicable only if the developer has development permissions (i.e., code push permissions) for at least one repository listed in the repository list, and this repository serves as the developer's entry repository. The entry repository is the target repository for the developer to modify and submit code, and the build client uses the submission to the entry repository as the version revision identifier for the build request. Users who do not have development permissions for any repositories are not considered target users of this system; such users do not participate in code development activities and are not within the scope of this system.

[0043] In this embodiment, the specific decision-making process for clone selection is as follows: The developer workstation maintains a repository list, which records the name of each repository, its address on the version control platform, and the corresponding API stub repository address. When initializing the working environment, the developer attempts to clone the actual repository addresses of each repository in the repository list one by one using their own credentials. If the version control platform returns a permission denial response, the developer then clones the corresponding API stub repository address from the repository list. The cloning selection results in a local checkout directory for each repository, containing the complete source code of the actual repository or the API information of the API stub repository.

[0044] After the clone selection is completed, the developer workstation records the clone type identifier of each repository locally, indicating whether the checkout directory comes from a real repository or an interface stub repository, so as to determine the entry repository in subsequent build requests.

[0045] In this embodiment, multiple checkout results are combined into a compilation workspace according to the existing paths of each repository in the version control platform. The compilation workspace is a Cargo workspace. The Cargo workspace declares member paths through a workspace manifest file, placing each checkout directory at its corresponding relative path location, ensuring that the relative directories pointed to by the path dependency declarations actually exist in the local file system.

[0046] For example, when the path dependency declaration of repository A specifies that repository C is located at the relative path .. / repo_c, the developer workstation checks out the Stub repository of repository C to the relative path location, and the path dependency declaration is satisfied in the local file system.

[0047] In another implementation, the compilation workspace can also be implemented through path-dependent layout, establishing dependencies directly through relative path declarations between repositories without relying on the workspace manifest file.

[0048] For example, in a project topology containing three repositories, repository A is the application layer business logic repository, repository B is the infrastructure repository, and repository C is the common component library. Repository A's manifest file declares path dependencies on repositories B and C, while repository B's manifest file declares path dependencies on repository C.

[0049] When a developer only has development permissions for repository A, the developer workstation clones the real repository of repository A, the stub repository of repository B, and the stub repository of repository C, and places the three checkout directories (i.e. checkout results) in the local file system according to the existing path relationship in the version control platform.

[0050] Subsequently, the workspace manifest file of the compilation workspace declares three checkout directories as member paths. The path dependency declaration for repository A points to the checkout directories of the stub repositories of repository B and C, while the path dependency declaration within the stub repository of repository B points to the checkout directory of the stub repository of repository C. After the development tool establishes a semantic index for the compilation workspace, developers can jump to the interface signatures of repositories B and C when editing source files of repository A, obtaining parameter type hints and trait constraint checks. During compilation, the controlled remote build server combines all real repositories of repositories A, B, and C according to the same path relationships, using the actual source code to complete compilation and testing.

[0051] It should be noted that the path combination of the compilation workspace must meet the following constraints: the relative path relationships of each repository in the repository manifest must be consistent with the project layout in the version control platform, ensuring that path dependency declarations between any two repositories can be resolved in the local file system. The developer workstation performs path dependency verification after combining the compilation workspace: it iterates through the path dependency declarations of all manifest files in the compilation workspace, checking whether the target path pointed to by each declaration exists in the local file system and contains a valid manifest file. For declarations that fail path dependency verification, the developer workstation outputs diagnostic information, indicating the missing repository name and the expected checkout path. This path dependency verification ensures that the compilation workspace has a complete dependency graph before being submitted to the development tool.

[0052] Furthermore, the development tool performs navigation and static analysis based on the compilation workspace. In this embodiment, the development tool is the rust-analyzer language server running in the integrated development environment. The rust-analyzer reads the manifest file and path dependency declarations of the Cargo workspace and builds a semantic index for all source files and stub files in the compilation workspace.

[0053] For source files in the real repository, rust-analyzer provides complete code navigation, type inference, and auto-completion; for interface files in the stub repository, rust-analyzer provides cross-repository function navigation, parameter hints, and type checking based on preserved interface signatures and type definitions. The development tool performs static analysis in its local compilation workspace, without needing to access the controlled remote build server.

[0054] In an alternative implementation, rust-analyzer can be replaced by another language server based on a language service protocol that defines the communication specifications between the editor and the language server.

[0055] The development tool provides differentiated analysis capabilities for the real repository source files and Stub repository interface files in the compilation workspace.

[0056] For source files in a real repository, the development tool provides the following analysis capabilities: function definition jump, call relationship tracing, variable renaming, code inline suggestions, real-time compilation error diagnosis, and automatic code formatting.

[0057] For interface files in the Stub repository, the development tool provides the following analysis capabilities: cross-repository function signature jump, parameter type hints, trait implementation checks, and type constraint verification. When the development tool encounters a stub in the Stub repository, it marks the function as an external implementation and does not perform data flow analysis on the stub's internal structure.

[0058] It should be understood that the difference in analytical capabilities does not affect the developer's code writing experience in the compilation workspace. Developers can still obtain complete parameter hints and type checking feedback when calling public functions in unauthorized repositories.

[0059] In this embodiment, the developer workstation further includes a build client, which is used to send a request that satisfies the structured request constraints to the controlled remote build server.

[0060] The build client is a Cargo Remote client. The structured request constraint requires that the request not contain source code content. The structured request constraint also requires that the request not contain version control addresses, branch names, or executable commands. The Cargo Remote client serializes the build request into a structured protocol object containing a project identifier, entry repository identifier, version revision identifier, and operation type. This structured protocol object only contains identifiers and enumeration values, and does not carry any source code text, version control addresses, branch names, or executable shell commands.

[0061] For example, the operation type is defined as an enumeration type, whose values ​​include compile, test, and check, corresponding to the remote execution of the `cargo build`, `cargo test`, and `cargo check` commands, respectively. Before initiating a compile or test request, the build client checks whether there are any tracked or untracked changes in the current Git workspace, extracts the unique repository name from the origin URL, and parses the HEAD into a complete commit SHA as the version revision identifier. In another embodiment, the structured request can also be carried via the JSON-RPC protocol, with the request body containing the method name and parameter object, but also excluding source code content and executable commands.

[0062] It should be noted that if the request carries source code content, the developer can embed probe code for their own unauthorized repository and indirectly infer the implementation details of the protected repository through compiler error diagnosis information. If the request carries a version control address and branch name, the developer can specify to pull any branch of any repository, bypassing the pre-configured repository range and pull baseline of the controlled remote build server. If the request carries executable commands, the developer can use the execution permissions of the controlled remote build server to perform arbitrary operations. Therefore, the structured request constraint, by limiting the types of request content to identifiers and enumeration values, excludes the above attack paths at the protocol level.

[0063] In this embodiment, the complete lifecycle of the structured request sent by the construction client includes the following stages: pre-check stage, request construction stage, transmission stage, and result reception stage.

[0064] During the pre-check phase, the build client verifies the cleanliness of the current Git workspace, confirms that there are no uncommitted changes, and ensures that the commit corresponding to the version revision identifier has been pushed to the version control platform.

[0065] During the request build phase, the build client reads the project identifier from the configuration of the compilation workspace, determines the entry repository identifier from the clone type identifier, parses HEAD into a commit SHA as the version revision identifier, and assembles the structured protocol object in combination with the operation type selected by the developer.

[0066] During the transmission phase, the build client sends the structured protocol object to the controlled remote build server via an encrypted channel. During the result reception phase, the build client receives the build diagnostics, test outputs, and build artifacts after output review, outputs the build diagnostics to the developer workstation's terminal interface, and stores the build artifacts in the target directory of the compilation workspace.

[0067] like Figure 2 As shown, after receiving the structured request sent by the build client, the controlled remote build server uses the pre-configured real repository address and credentials to assemble the complete real source code in identity-isolated storage. The controlled remote build server's configuration pre-registers the version control address and corresponding read-only deployment key for each real repository. The read-only deployment key only has cloning and pulling permissions for the repository, not push permissions. The controlled remote build server uses the credentials to pull the real repositories to the identity-isolated storage as needed. It skips pulling for cached and version-matched real repositories, and only performs incremental pull operations for repositories with mismatched versions or those not cached. The compilation and testing operations in the build request are precisely bound to the commit SHA of the developer's entry repository, while other repositories maintain the pull baseline selected in the most recent pull operation.

[0068] It should be noted that the entry repository is the repository that the developer is currently modifying. Developers need to verify whether their specific commits can pass compilation and testing; therefore, the entry repository must be precisely checked out to the commit SHA specified by the developer. The other repositories are dependency repositories, whose version status is managed uniformly by the administrator through pull operations and is not affected by individual developer build requests. This differentiated binding strategy between the pull baseline and the precise entry version prevents developers from pushing dependency repository versions to arbitrary commits through build requests, thus retaining version control of dependency repositories on the administrator's side.

[0069] For example, when a developer submits a new code change to repository A and pushes it to the version control platform, the request sent by the build client only includes the commit SHA of repository A as the version revision identifier. The controlled remote build server checks out repository A to the commit SHA, and repositories B and C keep the version determined by the administrator when the last pull operation was performed.

[0070] The processing flow of the controlled remote construction server after receiving the structured request includes: First, extract the project identifier and identity identifier from the structured protocol object, calculate the name of the isolated storage directory, and obtain the exclusive lock of the isolated storage directory; Secondly, the entry repository identifier and version revision identifier are extracted from the structured protocol object. Incremental fetching is performed on the entry repository in the isolated storage directory and the commit specified by the version revision identifier is checked out. The cache status of other repositories is checked and incremental fetching is performed as needed. Subsequently, all real repositories in the isolated storage directory are combined into a complete compilation workspace, and dependency metadata parsing and whitelist checks are performed. Then, the controlled isolated execution environment is created and offline compilation and testing are performed; Finally, the output is reviewed and the result is returned to the build client, releasing the exclusive lock. Each step in the process is performed within the protection of the exclusive lock, ensuring that the same isolated storage directory is accessed by only one build request at a time.

[0071] Furthermore, the identity-isolated storage is an isolated storage directory established based on derived values ​​of the identity identifier and the project identifier. In this embodiment, the identity identifier is the developer's SSH public key fingerprint, and the project identifier is the project's unique number in the version control platform. The controlled remote build server performs a SHA-256 hash operation on the identity identifier and the project identifier, separated by null bytes, and uses the output value of the hash operation as the name of the isolated storage directory.

[0072] It should be noted that the isolated storage directories corresponding to different identity identifiers are not shared, and different projects of the same developer correspond to different isolated storage directories. The isolated storage directories store the Git workspace, the Cargo build target cache, and initialization tag files.

[0073] The controlled remote build server serializes concurrent access to the same isolated storage directory using an exclusive lock. In this embodiment, the exclusive lock is a file system-level exclusive lock. When the same developer initiates concurrent build requests for the same project, the later-arriving request waits until it acquires the exclusive lock, and can only enter the isolated storage directory to perform operations after the preceding request releases the exclusive lock. After the process exits or is terminated, the operating system automatically releases the exclusive lock when the file descriptor is closed.

[0074] In this embodiment, the hash naming method ensures that the name of the isolated storage directory does not contain the original information of the identity identifier and the project identifier, thus preventing the directory owner from being identified at the file system level. The controlled remote build server internally maintains the mapping relationship between the identity identifier, project identifier, and the isolated storage directory name. This mapping relationship is only maintained in the memory of the service process of the controlled remote build server and is not exposed to the build client. Furthermore, the file system permissions of the isolated storage directory are set to be readable and writable only by the running user of the service process. The service process runs as an independent system user, isolated from other system services and user processes.

[0075] In another embodiment, the identity identifier can also be a user-unique identifier of the version control platform instead of the SSH public key fingerprint, and the project identifier can also be a combination string of repository name and namespace, with the derivation method of the two maintaining the same hash operation logic.

[0076] In this embodiment, the lifecycle management of the isolated storage directory includes three stages: initialization, reuse, and cleanup.

[0077] During the initialization phase, when the controlled remote build server receives a build request for the first time using a combination of an identity and a project identity, it creates the isolated storage directory, writes an initialization tag file into the isolated storage directory, and clones all real repositories from the version control platform to the Git workspace in the isolated storage directory.

[0078] During the reuse phase, when the controlled remote build server receives a subsequent build request with the same combination of identity and project identifier, it checks whether an initialization marker file exists in the isolated storage directory. If it does, it directly reuses the cached repositories and build target caches in the isolated storage directory, performing incremental fetching only for repositories with version mismatches. This reuse mechanism enables incremental compilation to utilize intermediate build artifacts generated by previous builds, reducing the time overhead of repeated compilations.

[0079] During the cleanup phase, the controlled remote build server provides a cleanup interface, allowing developers to send cleanup requests through the build client. The controlled remote build server then deletes the compilation target cache in the corresponding isolated storage directory, preserving the Git workspace to avoid full recloning.

[0080] In another embodiment, the isolated storage directory can also be configured with an automatic expiration policy, which automatically deletes the isolated storage directory when it is not accessed within a preset time.

[0081] The controlled remote build server assembles the complete real source code in the isolated storage directory and then performs offline compilation and testing in the controlled isolated execution environment. In this embodiment, the controlled isolated execution environment is a rootless Podman container. The rootless Podman container runs as a non-privileged user, uses a fixed version of the container image and does not pull it from the network. The container is read-only by default, network isolated, and has independent processes, inter-process communication, and hostname namespaces. All capability flags are removed and the option to disable new privileges is enabled. Simultaneously, the number of processes, memory, and CPU resources are limited. The isolated storage directory is mounted to the container's working directory in read-only mode.

[0082] In another embodiment, the controlled isolated execution environment can also be implemented using a lightweight virtual machine, which provides independent kernel isolation and is suitable for deployment scenarios with higher isolation requirements.

[0083] The security configuration of the controlled isolated execution environment is based on the principle of least privilege. The root file system of the container is mounted in read-only mode, and only the compilation target cache directory is mounted in read-write mode. The compiler writes intermediate and final compilation artifacts to the compilation target cache directory. The container does not mount the host machine's user directory, configuration directory, and system directory, and processes within the container cannot access other user data and system configurations on the host machine.

[0084] In this embodiment, the process limit of the container prevents fork bombs during compilation from exhausting host resources, the memory limit prevents the compiler or test program from allocating more memory than expected, and the CPU limit prevents a single build task from occupying all computing resources for an extended period. The container is destroyed immediately after the build task is completed, without retaining any runtime state.

[0085] The process of creating the controlled isolated execution environment includes: The controlled remote build server loads a fixed version of a container image from a local image repository. The container image is pre-installed with a compiler toolchain and basic system libraries. Create a container instance as a non-privileged user, bind and mount the workspace in the isolated storage directory to the working directory inside the container in read-only mode, and bind and mount the compilation target cache directory to the target directory inside the container in read-write mode; Configure container namespace isolation parameters, including independent process namespaces, inter-process communication namespaces, and hostname namespaces; Remove all Linux capability tags from the container and set a security option to prevent the acquisition of new privileges; Configure the container's resource limit parameters, including the maximum number of processes, maximum memory usage, and CPU time quota; configure the container's network namespace to a state with no external connections.

[0086] Once the creation process is complete, the controlled remote build server initiates compilation or testing commands within the container.

[0087] For example, the compilation operation corresponds to executing the `cargo build` command within the container, the testing operation corresponds to executing the `cargo test` command within the container, and the checking operation corresponds to executing the `cargo check` command within the container. The compiler process within the container inherits all the security constraints of the container and does not have permission to bypass namespace isolation and resource restrictions.

[0088] The controlled isolated execution environment disconnects from the network before performing compilation and testing, and only uses dependencies that have been pre-fetched and cached in the identity-isolated storage.

[0089] When creating the controlled isolated execution environment, the controlled remote build server configures the network namespace of the container or virtual machine to a state with no external connections, and the compiler and test program can only access the cached dependency packages and repository files in the isolated storage directory.

[0090] In this embodiment, all dependencies involved in compilation must exist as path dependencies in the actual repository workspace of the isolated storage directory. The compiler is not allowed to download new dependencies from the network registry or remote version control repository during compilation, thus constituting the constraint of offline compilation. This constraint ensures that no code outside the pre-configured scope of the controlled remote build server is introduced during compilation. The compiler performs dependency resolution in offline mode, reads the path dependency declarations of each repository manifest file in the isolated storage directory, constructs a complete dependency graph, and verifies that all dependencies are available locally.

[0091] Generally, the dependency caching mechanism for offline compilation works as follows: During the initialization phase or subsequent incremental fetch phase of the isolated storage directory, the controlled remote build server fetches all real repositories and their path dependency declarations referencing local dependency packages into the isolated storage directory. All repositories and dependency packages in the isolated storage directory constitute a self-contained compilation closure. Any dependency resolution path within this compilation closure points to a local path within the isolated storage directory, and there are no dependency references pointing to external network addresses.

[0092] It should be noted that the controlled remote build server verifies the integrity of the compilation closure before starting compilation: it iterates through all path dependency declarations and working directory member declarations in the manifest files, and checks whether the local path pointed to by each declaration exists and contains a valid manifest file.

[0093] If the integrity verification fails, the controlled remote build server refuses to execute the compilation and records the missing dependency information in the build diagnostics. The dependency cache is persisted throughout the lifecycle of the isolated storage directory. In the reuse phase, the cached dependencies are used directly without having to be fetched again, and incremental updates are only performed when the dependency version changes.

[0094] In this embodiment, the controlled remote build server performs a whitelist check on the build scripts and process macros in the dependency declarations before performing offline compilation in the controlled isolated execution environment.

[0095] The build script is a `build.rs` file, and the procedural macro is a dependency library of type `proc-macro`. The controlled remote build server performs dependency metadata parsing in offline mode, scanning all dependency manifest files in the isolated storage directory, extracting a list of dependencies that declare build scripts or procedural macros, and comparing this list item by item with a pre-approved whitelist by the administrator. Only build scripts and procedural macros on the whitelist are allowed to participate in compilation; build scripts or procedural macros not on the whitelist are rejected by the controlled remote build server, and the reason for rejection is recorded in the build diagnostics.

[0096] It should be noted that the build script executes as an independent process during compilation, possessing the ability to read and write to the file system and execute system calls; the procedural macros execute within the compiler as compile-time plugins, capable of generating and transforming code. Without control over the build script and procedural macros, malicious dependency packages could use the build script to read protected source code from the isolated storage directory and encode it into the compilation output, or use procedural macros to generate code segments containing protected source code during compilation. The whitelist mechanism, however, limits the execution scope of the build script and procedural macros to known secure dependencies approved by the administrator, blocking unauthorized code execution paths from the compilation stage.

[0097] Generally, the whitelist is maintained by the administrator. When introducing new third-party dependencies or updating dependency versions, the administrator reviews the behavior of their build scripts and process macros, and adds them to the whitelist after confirming that they are safe.

[0098] In this embodiment, the controlled remote build server does not expose the actual workspace to the build client. The build client does not have any access path to the file system of the controlled remote build server, and the response to the structured request does not contain the file system path, directory structure, or source file content of the workspace.

[0099] Communication between the controlled remote build server and the build client is conducted solely through the structured request protocol, and the response message types of the protocol are limited to three categories: build diagnostic messages, test result messages, and build artifact messages.

[0100] The build diagnostic message includes error, warning, and prompt information output by the compiler; the test result message includes the pass, fail, and skip status of each test case and its output text; and the build artifact message includes the contents of the compiled binary file or library file. None of these three types of messages contain the path information of the isolated storage directory, the version control address of the actual repository, or the source file content.

[0101] The controlled remote build server performs output review on the build diagnostics, test outputs, and build artifacts before returning them to the developer's workstation. The output review includes imposing log size limits on the build diagnostics and artifact size limits on the build artifacts.

[0102] For example, the log size limit truncates the diagnostic information output by the compiler to a preset maximum number of bytes, and the artifact size limit imposes an upper limit threshold on the total size of the build artifacts. Build diagnostics exceeding the log size limit are truncated and marked with a truncation flag, while build artifacts exceeding the artifact size limit are rejected and the rejection reason is recorded in the response. The build diagnostics, test outputs, and build artifacts, after being reviewed by the output, are returned to the developer workstation through the structured request response channel.

[0103] After receiving the build diagnostics, the build client formats and outputs the compiler's error, warning, and prompt information to the developer's workstation terminal interface. The development tool can parse the file path and line number information in the build diagnostics and mark the corresponding code locations in the editor. The file path in the build diagnostics is an internal path in the isolated storage directory of the controlled remote build server. Before outputting, the build client converts the internal path to the corresponding path in the developer's local compilation workspace, enabling the development tool to correctly locate the source file.

[0104] For entry repositories that developers have permission to access, the file content of the local real repository and the server-side real repository is consistent. The converted file path and line number information can accurately locate the corresponding position in the local source file. For dependency repositories that developers do not have permission to access, the local repository is an interface stub repository. The converted path can locate the corresponding interface stub file, but because the number of lines in the interface stub file is different from the real source file, the line number in the diagnostic information cannot accurately correspond to the line position in the interface stub file. The development tool provides external implementation markers for files originating from the interface stub repository in the diagnostics. Developers need to find the corresponding interface in the local interface stub file based on the function name and error description in the diagnostic information. Compilation errors in dependency repositories usually indicate that the calling method in the entry repository is incorrect. Developers mainly modify the entry repository code based on the error message.

[0105] After receiving the build artifacts, the build client stores the compiled binary files or library files in the target directory of the compilation workspace. The path of the target directory is consistent with the target directory during local compilation, so that subsequent running and deployment operations can directly reference the artifacts in the target directory. After receiving the test output, the build client formats and outputs the pass, failure, and skip status of each test case and its output text to the terminal interface. Developers can use the test output to determine whether code changes have introduced regression issues.

[0106] It should be noted that the compiler's diagnostic output may contain fragment references to source files. When a compilation error occurs in a source file of a protected repository, the diagnostic output may contain text content of the protected source code. An abnormally large increase in the size of the build artifact may indicate that additional data was encoded into the artifact during the compilation process. The log size limit reduces the risk of a large amount of source code being leaked in the diagnostic information by truncating excessively long diagnostic output. The artifact size limit, by rejecting abnormally large artifacts, blocks the path of transmitting additional data through artifact size expansion.

[0107] The output review works in conjunction with the whitelist check: the whitelist check blocks the execution of unauthorized code before compilation, and the output review performs a final verification of the output results after compilation, forming a dual protection before and after compilation.

[0108] In this embodiment, the security protection system of the controlled remote construction server consists of the following layers: The first layer is protocol layer protection. The structured request constraint limits the request to contain only identifiers and enumeration values, thus eliminating source code injection and command injection attack paths from the protocol level. The second layer is the storage layer protection. The identity-isolated storage ensures that the build environments of different developers are not visible to each other and do not interfere with each other through hash naming and exclusive locks. The third layer is pre-compilation protection, where the whitelist check blocks the execution of unapproved build scripts and process macros before the compiler starts. The fourth layer is execution layer protection. The controlled isolated execution environment constrains the behavioral boundaries of the compilation process through namespace isolation, read-only file systems, network disconnection, and resource limits. The fifth layer is the output layer protection. The output review performs size limit checks on all compiled outputs to reduce the risk of leaking protected information through the output channel. Each of the five layers of protection operates independently; if any single layer is bypassed, the other layers can still provide protection.

[0109] For example, when a whitelisted build script is found to have a security flaw, the read-only file system restriction and network disconnection restriction of the execution layer protection can still constrain the behavior of the build script, and the size restriction of the output layer protection can still block abnormally large data output.

[0110] The controlled remote build server does not provide interactive terminal access, file browsing interfaces, or remote debugging interfaces to the build client. The interaction between the build client and the controlled remote build server is strictly limited to a request-response model: the build client sends a structured request, and the controlled remote build server executes the complete build process and returns a structured response. The build process does not accept intermediate input or real-time intervention from the build client. This request-response model ensures that the build client cannot dynamically change compilation parameters, inject additional code, or access intermediate states during the build process.

[0111] It should be understood that the embodiments of this application achieve two-layer decoupling through the above technical solution.

[0112] The first layer of decoupling involves decoupling source code reading permissions from the visibility of development interfaces: In existing technologies, developers need full access to the source code of the actual repository to obtain interface information locally for code navigation and static analysis. However, in this application's solution, the interface stub repository area allows developers without source code access to gain interface-level visibility by cloning the repository, enabling them to perform code navigation and static analysis locally without needing to access the actual source code. The interface stub repository only exposes interface signatures and type definitions, not the protected implementation logic; therefore, the visibility gained by developers is limited to the interface level.

[0113] The second layer of decoupling is the decoupling of the local hybrid workspace from the remote full-fledged real workspace: In the prior art, compilation and testing operations need to be performed in a workspace containing all the real source code. The developer's local workspace either contains all the real source code or cannot be compiled. In the solution of this application, the complete real source code is only assembled in the isolated storage of the controlled remote build server. The local compilation workspace of the developer's workstation does not contain real source code from a repository without permissions. The compilation and testing operations are delegated to the controlled remote build server for execution through the build client.

[0114] It should be understood that the two-layer decoupling allows developers without access to the actual source code to obtain both local development and analysis support and remote build and compilation and testing capabilities.

[0115] This application also provides a source code isolation development method based on repository permissions, which is applied to the above-mentioned system. For example... Figure 3 As shown, the method includes the following steps: S100: Clone selection is performed on each repository based on the version control platform's permissions. For repositories with development permissions, the real repository in the real repository area is cloned; for repositories without development permissions, the corresponding interface stub repository in the interface stub repository area is cloned. Multiple checkouts are combined into a compilation workspace according to existing paths, allowing development tools to complete navigation and static analysis.

[0116] The cloning selection is based on the version control platform's authentication response to the developer's credentials. The developer workstation then sequentially performs cloning processing on each repository in the repository list: The developer initiates a clone request to the version control platform using their version control credentials; if the version control platform returns a successful authentication response, the complete contents of the real repository are cloned to the local checkout directory; if the version control platform returns a permission denial response, the clone is executed at the corresponding interface stub repository address recorded in the repository list.

[0117] After the clone selection is completed, the developer workstation traverses all local checkout directories, verifies that each checkout directory contains a valid manifest file and source file or interface file, and records the clone type identifier of each repository in the local configuration.

[0118] During the assembly of the compilation workspaces, the developer workstation places each checked-out directory in its corresponding file system path location according to the relative path relationships recorded in the repository list, thus constructing a complete path dependency graph. After the compilation workspaces are assembled, the development tool automatically starts semantic index construction, establishing a complete semantic model for the real repository source files and an interface-level semantic model for the interface files in the interface stub repository.

[0119] S200 involves sending a request that meets structured request constraints to a controlled remote build server via a client. This request includes a project identifier, entry repository identifier, version revision identifier, and operation type, but does not include source code content, version control address, branch name, or execution command.

[0120] Before sending a request, the build client performs a workspace cleanliness verification and version revision identifier resolution. The workspace cleanliness verification checks that there are no modified but uncommitted files or untracked files in the Git workspace of the current entry repository, ensuring that the commit content corresponding to the version revision identifier is consistent with the content on the version control platform.

[0121] The version revision identifier resolution process parses the HEAD reference of the current entry repository into a complete 40-character hexadecimal commit SHA string, avoiding the use of variable references such as branch names or tag names as version identifiers. The build client extracts a unique repository name from the remote address of the entry repository as the entry repository identifier and reads the project identifier from the project configuration file in the build workspace. After the structured protocol object is assembled, the build client transmits the structured protocol object to the controlled remote build server via an SSH encrypted channel, which is also used to transmit the developer's identity identifier.

[0122] S300, after receiving the request, the controlled remote build server uses pre-configured credentials to assemble the complete real source code in identity-isolated storage, completes offline compilation and testing in a controlled isolated execution environment, and returns the build diagnostics, test outputs and build artifacts to the developer workstation after reviewing the outputs.

[0123] The controlled remote build server performs the following sub-steps sequentially before executing compilation: Extract the identity identifier and project identifier from the structured protocol object and SSH session, calculate the hash name of the isolated storage directory, and acquire an exclusive lock; In the isolated storage directory, perform incremental pulls on the entry repository and check out the exact commit specified by the version revision identifier; perform incremental pulls on other repositories as needed and maintain the pull baseline version. Dependency metadata is parsed in offline mode, all dependencies that declare build scripts or process macros are extracted and compared with a whitelist, and dependencies not included in the whitelist are rejected.

[0124] After the sub-step is completed, the controlled remote build server creates the controlled isolated execution environment, mounts the workspace in the isolated storage directory in read-only mode, mounts the compilation target cache directory in read-write mode, and performs compilation or testing operations after disconnecting network access.

[0125] After compilation or testing is complete, the controlled remote build server extracts compiler diagnostic output, test results, and build artifacts from the controlled isolated execution environment. It then sequentially performs log size limit checks and artifact size limit checks, returning the approved outputs to the build client via the SSH encrypted channel. The controlled isolated execution environment is destroyed immediately after result extraction, and the exclusive lock is released after all operations are completed.

[0126] During the execution of the method, the local compilation workspace of the developer's workstation never contains the actual source code of the unauthorized repository. The requests sent by the build client do not contain any source code content, and the results returned by the controlled remote build server do not contain the path information of the actual workspace or the content of the source files. Through these constraints, the method ensures that unauthorized developers gain compilation and testing capabilities without accessing the implementation code of the protected repository.

[0127] Example 2 In Example 1, the controlled remote build server uses pre-configured credentials to assemble complete, real source code in identity-isolated storage. This example, however, employs different version selection strategies for the entry repository and dependency repositories.

[0128] The controlled remote build server maintains two types of version states: pull baseline and entry precise version. The pull baseline is a version snapshot determined by the controlled remote build server during batch version synchronization operations on all real repositories in the isolated storage directory when receiving a pull command. The entry precise version is a specific commit specified by the version revision identifier submitted by the build client when initiating a compilation or test request.

[0129] Specifically, after receiving a compilation or test request, the controlled remote build server performs the following version combination operation: First, extract the entry repository identifier and version revision identifier from the structured request; second, perform an incremental pull on the entry repository in the isolated storage directory and check out the exact commit specified by the version revision identifier, while keeping the pull baseline version determined by the most recent pull operation unchanged for other repositories in the isolated storage directory except for the entry repository; finally, verify whether the path dependency declaration between the exact commit of the entry repository and the pull baseline versions of the other repositories is satisfied in the file system of the isolated storage directory.

[0130] For example, when the isolated storage directory contains three real repositories—repository A, repository B, and repository C—the request submitted by the build client specifies repository A as the entry repository identifier and a specific commit SHA of repository A as the version revision identifier. The controlled remote build server performs an incremental pull on repository A and checks out to the specific commit SHA, while repositories B and C maintain the baseline versions determined by previous pull operations. This version combination allows developers to verify their exact commits in the entry repository, while preventing any client from simultaneously advancing versions of all dependent repositories.

[0131] In another implementation, when the structured request contains version revision identifiers for multiple repositories, the controlled remote build server can perform precise version detection for each repository separately. Repositories for which no version revision identifier is specified in the structured request will continue to pull the baseline version.

[0132] Example 3 In Example 1, the controlled remote build server performs a whitelist check on the build scripts and process macros in the dependency declaration. This example introduces dependency source attribution verification and a tiered strategy evaluation.

[0133] Specifically, before performing a whitelist check, the controlled remote build server first performs metadata parsing on all dependencies in the isolated storage directory in offline mode to construct a dependency graph. Each node in the dependency graph corresponds to a dependency package, and each edge corresponds to a dependency relationship.

[0134] The controlled remote build server performs source attribution verification on each node in the dependency graph: it performs prefix matching between the file system path of the dependency package corresponding to the node and the checkout paths of each real repository in the isolated storage directory to determine the repository identifier to which the dependency package belongs. Dependency packages that fail to match any real repository checkout path are marked as external dependencies.

[0135] The controlled remote build server performs a tiered policy evaluation on dependency packages that declare build scripts or procedural macros based on the repository ownership of the dependency packages and the policy rules pre-configured by the administrator. The policy rules configure a policy level for each repository identifier, including three levels: Allow, Audit, and Deny. Build scripts and procedural macros in dependency packages with a policy level of Allow directly participate in compilation; build scripts and procedural macros in dependency packages with a policy level of Audit participate in compilation, but the controlled remote build server records an audit log in the build diagnostics, which includes the dependency package name, repository ownership, build script path, and procedural macro type; build scripts and procedural macros in dependency packages with a policy level of Deny are prohibited from participating in compilation, and the controlled remote build server denies them and records the reason for denial in the build diagnostics. Dependency packages marked as external dependencies but not explicitly listed in the whitelist are subject to the Deny policy by default.

[0136] For example, an administrator configures a policy level of "allow" for repository A, "audit" for repository B, and "deny" for repository C. When a dependency package in repository A declares a build script, the build script directly participates in the compilation; when a dependency package in repository B declares a procedural macro, the procedural macro participates in the compilation and generates audit logs; when a dependency package in repository C declares a build script, the build script is denied.

[0137] In another implementation, the policy rules can also be configured based on the name and version number of the dependent packages, rather than by repository identifier. The policy rules may also include file hash verification of the build scripts, allowing only build scripts matching pre-registered hash values ​​to participate in compilation.

[0138] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware.

[0139] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A source code isolation development system based on repository permissions, characterized in that, include: The real repository area is configured on the version control platform and is used to control the reading and access of source code according to project permissions; The interface stub repository area corresponds to the actual repository area and is used to retain the interface information required for development and analysis. The developer workstation is used to select and clone the real repository in the real repository area or the corresponding interface stub repository in the interface stub repository area according to the permissions of the version control platform, and combine multiple checkout results into a compilation workspace. A controlled remote build server is used to assemble complete real source code based on a pre-configured real repository address and credentials, and complete offline compilation and testing; The controlled remote build server performs output review on the build diagnostics, test outputs, and build artifacts before returning them to the developer's workstation; The developer workstation also includes a build client for sending requests to a controlled remote build server, the requests satisfying structured request constraints.

2. The system according to claim 1, characterized in that, The controlled remote build server also includes: An isolated storage directory is constructed based on the derived values ​​of the identity identifier and the project identifier, wherein the isolated storage directories corresponding to different identity identifiers are not shared with each other; Concurrent access to the same isolated storage directory is serialized using exclusive locks.

3. The system according to claim 1, characterized in that, Before performing offline compilation, the controlled remote build server performs a whitelist check on the build scripts and process macros in the dependency declaration, so that the build scripts and process macros in the whitelist can participate in the compilation, and the build scripts or process macros not included in the whitelist are rejected.

4. The system according to claim 1, characterized in that, The output review includes: Apply a log size limit to the build diagnostics; A product size limit is imposed on the constructed product.

5. The system according to claim 1, characterized in that, The interface stub repository in the interface stub repository area retains the public interface signature and type definition of the real repository, and the function bodies and method bodies in the interface stub repository are replaced with stubs that do not contain implementation logic.

6. A source code isolation development method based on repository permissions, applied to the system according to any one of claims 1 to 5, characterized in that, The method includes: The cloning selection is performed on each repository according to the permissions of the version control platform. The cloning selection includes cloning the real repository for repositories with development permissions and cloning the corresponding interface stub repository for repositories without development permissions. Combine multiple detection results into a compilation workspace; The client sends a request to the controlled remote build server. After receiving the request, the controlled remote build server assembles the complete real source code and completes offline compilation and testing; it then performs output review on the build diagnostics, test outputs, and build artifacts before returning them to the developer's workstation.

7. The method according to claim 6, characterized in that, When performing a clone selection, the interface stub repository retains the public interface signature and type definition of the real repository, and the function bodies and method bodies in the interface stub repository are replaced with stubs that do not contain implementation logic.

8. The method according to claim 6, characterized in that, Complete offline compilation and testing includes: Disconnect from network access before performing compilation and testing; Perform offline compilation and testing using pre-acquired dependencies.

9. The method according to claim 6, characterized in that, The output review includes: Apply a log size limit to the build diagnostics; A product size limit is imposed on the constructed product.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the operation of the source code isolation development system based on repository permissions as described in any one of claims 1 to 5, or implements the source code isolation development method based on repository permissions as described in any one of claims 6 to 9.