{
  "Provider": "aws",
  "CheckID": "codeartifact_packages_external_public_publishing_disabled",
  "CheckTitle": "Ensure CodeArtifact internal packages do not allow external public source publishing.",
  "CheckType": [],
  "ServiceName": "codeartifact",
  "SubServiceName": "",
  "ResourceIdTemplate": "arn:partition:codeartifact:region:account-id:repository/repository-name",
  "Severity": "critical",
  "ResourceType": "Other",
  "Description": "Ensure CodeArtifact internal packages do not allow external public source publishing.",
  "Risk": "Allowing package versions of a package to be added both by direct publishing and ingesting from public repositories makes you vulnerable to a dependency substitution attack.",
  "RelatedUrl": "https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html",
  "Remediation": {
    "Code": {
      "CLI": "aws codeartifact put-package-origin-configuration --package 'MyPackage' --namespace 'MyNamespace' --domain 'MyDomain' --repository 'MyRepository' --domain-owner 'MyOwnerAccount' --format 'MyFormat' --restrictions 'publish=ALLOW,upstream=BLOCK'",
      "NativeIaC": "",
      "Other": "",
      "Terraform": ""
    },
    "Recommendation": {
      "Text": "Configure package origin controls on a package in a repository to limit how versions of that package can be added to the repository.",
      "Url": "https://docs.aws.amazon.com/codeartifact/latest/ug/package-origin-controls.html"
    }
  },
  "Categories": [],
  "Tags": {
    "Tag1Key": "value",
    "Tag2Key": "value"
  },
  "DependsOn": [],
  "RelatedTo": [],
  "Notes": "",
  "Compliance": []
}
