Checks/Aws/Test-CodeartifactPackagesExternalPublicPublishingDisabled.ps1

function Test-CodeartifactPackagesExternalPublicPublishingDisabled {
    <#
    .SYNOPSIS
        Internal CodeArtifact package does not allow publishing versions already present in external public sources

    .DESCRIPTION
        **AWS CodeArtifact packages** with an **internal or unknown origin** are evaluated for their **package origin controls**. The check identifies packages where the `upstream` setting allows ingesting versions from external or upstream repositories.

    .PARAMETER Check
        CIEMCheck object containing check metadata.
    #>

    [CmdletBinding()]
    [OutputType([PSCustomObject[]])]
    param(
        [Parameter(Mandatory)]
        [CIEMCheck]$Check
    )

    $ErrorActionPreference = 'Stop'

    # TODO: Implement check logic based on Prowler check: codeartifact_packages_external_public_publishing_disabled

    [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check codeartifact_packages_external_public_publishing_disabled for reference.', 'N/A', 'codeartifact Resources')
}