Skip to content

Publishing as a script or module on PS Gallery #3

Open

Description

@neohiro

Let us know if you'd like to help with the basic upload, there is an API key available.

Activity

  1. neohiro commented on Aug 26, 2026

    @neohiro
    OwnerAuthor

    PSGallery only accepts PowerShell packages: a module (.psd1 manifest + .psm1) or a script (.ps1 with PSData metadata). This repo's core artifacts are a Python GUI (ExploitProtection.PY) plus the mitigation XML — so publishing requires a thin PowerShell wrapper module around Set-ProcessMitigation.

    Minimal viable shape:

    # ExploitProtection.psm1
    function Import-XploitPolicy {
        [CmdletBinding()]
        param([Parameter(Mandatory)][string]$PolicyFile)
        Set-ProcessMitigation -PolicyFilePath $PolicyFile
    }
    Export-ModuleMember -Function Import-XploitPolicy
    # ExploitProtection.psd1 essentials: ModuleVersion, GUID, Author,
    # FunctionsToExport = 'Import-XploitPolicy', plus PSData tags.
    Publish-Module -Path .\ExploitProtection -NuGetApiKey $key

    Security note: the API key must never be pasted into issues, code, or chat. Put it in repository Actions secrets and publish from a workflow step calling Publish-Module -NuGetApiKey $env:PSGALLERY_KEY — keeps releases reproducible and the key non-exportable.

    Next step to make this real: add a module/ folder (manifest + wrapper + release workflow). Leaving open until that exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions