Use this skill to automate source-code encryption for embedded Script Tools in ArcGIS Pro .atbx toolboxes. The workflow is .atbx-only. Do not redirect the user to .pyt, arcpy.EncryptPYT, or GUI-by-GUI encryption unless they explicitly change scope.
AfCore.dll encryption through the bundled script..atbx format; do not convert to .pyt.--generate-password --no-password-prompt so a high-entropy password is generated in memory, never printed, never stored, and not recoverable from skill outputs.1234 except when reproducing the original research sample.pw; ArcGIS Pro needs it to recognize encrypted script payloads.scripts/batch_encrypt_atbx.py: batch encrypt embedded tool.script.execute.py; optionally include tool.script.validate.py.scripts/inspect_atbx.py: inspect one .atbx or compare plain/encrypted archives.scripts/validate_atbx_runtime.py: import encrypted .atbx with ArcPy, list tools, and optionally run a smoke test.scripts/doctor_atbx_environment.py: check ArcGIS Pro Python, arcpy, AfCore.dll, and required encryption exports.references/USAGE_PATTERNS.md: detailed command patterns for single files, folder releases, in-place backup, CI/CD, and dry-runs.references/PASSWORD_AND_SECURITY.md: password source precedence, custom password guidance, and release security boundaries.references/VALIDATION_AND_QA.md: structural checks, ArcPy runtime checks, acceptance criteria, and smoke-test examples.references/TROUBLESHOOTING.md: common failures and fixes.references/ATBX_ENCRYPTION_FINDINGS.md: observed GUI diff, pw behavior, native entry points, and proof summary.Load reference files only when the current task needs those details.
.atbx files or folders containing .atbx files.scripts/doctor_atbx_environment.py.scripts/inspect_atbx.py.--password or set a one-shot environment variable.--generate-password --no-password-prompt; do not ask for a password unless the user explicitly wants to choose one.scripts/batch_encrypt_atbx.py, normally to --output-dir or default _encrypted.atbx copies.scripts/inspect_atbx.py.scripts/validate_atbx_runtime.py or direct ArcPy smoke tests.Run the environment doctor:
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\doctor_atbx_environment.py'
Encrypt a single toolbox with a custom password from an environment variable:
$env:ARC_ATBX_PASSWORD='<custom-password>'
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\batch_encrypt_atbx.py' `
'E:\GIS_Projects\Test4CPP\testTools.atbx'
Encrypt with an explicit user-provided password:
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\batch_encrypt_atbx.py' `
'E:\GIS_Projects\Test4CPP\testTools.atbx' `
--password '<user-provided-password>'
Encrypt without a disclosed password:
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\batch_encrypt_atbx.py' `
'E:\GIS_Projects\Test4CPP\testTools.atbx' `
--generate-password `
--no-password-prompt
Batch encrypt a release folder:
$env:ARC_ATBX_PASSWORD='<custom-password>'
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\batch_encrypt_atbx.py' `
--root 'E:\GIS_Projects\Test4CPP\toolboxes' `
--output-dir 'E:\GIS_Projects\Test4CPP\release' `
--no-password-prompt
Inspect encrypted output:
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\inspect_atbx.py' `
'E:\GIS_Projects\Test4CPP\release\testTools.atbx'
Validate ArcPy import and optionally run a tool:
& 'C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe' `
'.\scripts\validate_atbx_runtime.py' `
'E:\GIS_Projects\Test4CPP\release\testTools.atbx' `
--alias enc `
--run-tool Script `
--params-json '[]'
.py and no embedded tool.script.execute.py exists, explain that the release pipeline must embed script code in the .atbx first.--overwrite only when the user explicitly accepts replacing release outputs.--in-place with backups unless the user explicitly disables backups.pw, skip by default; use --force only for intentional re-encryption.--include-validation and validate parameter UI/runtime behavior afterward.password_source is generated:undisclosed, do not claim that the password can be recovered. The encrypted tool can run, but source viewing/editing with a password is intentionally unavailable.pw in tool.content.00022e68..atbx.共 2 个版本