Description:
This policy ensures that CodeArtifact internal packages do not allow external public source publishing. This helps to mitigate the risk of sensitive information being leaked to the public.
Rationale:
CodeArtifact allows you to publish packages to both internal and external repositories. If you choose to publish an internal package to an external repository, it will be made available to the public. This could potentially expose sensitive information, such as source code or configuration files.
Impact:
If you allow external public source publishing for CodeArtifact internal packages, sensitive information could be leaked to the public. This could lead to data breaches, intellectual property theft, or other security incidents.
Default Value:
By default, CodeArtifact does not allow external public source publishing for internal packages.
Pre-requisites:
- Access to the AWS Management Console or the AWS CLI
- The ability to manage CodeArtifact repositories
Remediation Steps:
- Open the AWS Management Console or the AWS CLI.
- Go to the CodeArtifact console.
- Click on Repositories.
- Select the repository that you want to change the external public source publishing setting for.
- Click on the Settings tab.
- In the Package Origin Controls section, set the External Public Source Publishing setting to Disabled.
- Click on the Save button.
Test Plan:
- Verify that the external public source publishing setting is disabled for the repository.
- Try to publish an internal package to an external repository.
- Verify that you are unable to publish the package.
Implementation Plan:
- Follow the remediation steps above to implement the policy.
- Test the policy to make sure that it is working as expected.
AWS CLI Process:
To disable external public source publishing for CodeArtifact internal packages using the AWS CLI, you can use the following command:
aws codeartifact update-repository --repository-name <repository-name> --external-public-source-publishing disabled
Using AWS GUI:
To disable external public source publishing for CodeArtifact internal packages using the AWS GUI, you can follow these steps:
- Go to the AWS Management Console.
- Click on the CodeArtifact tab.
- Click on Repositories.
- Select the repository that you want to change the external public source publishing setting for.
- Click on the Settings tab.
- In the Package Origin Controls section, set the External Public Source Publishing setting to Disabled.
- Click on the Save button.
Backout Plan:
To enable external public source publishing for CodeArtifact internal packages, you can use the following command:
aws codeartifact update-repository --repository-name <repository-name> --external-public-source-publishing enabled
Note:
- This policy only applies to CodeArtifact internal packages.
- If you have any questions about this policy, please contact your AWS administrator.
Reference:
- CodeArtifact documentation: https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html
Section 2:
- Tags: security, packages, publishing, CodeArtifact
- Keywords: external public source publishing, CodeArtifact, AWS policy