Skip to content

fix: fod dast-scan get-config NPE when DAST Automated scan has not been configured#980

Merged
rsenden merged 2 commits intofortify:dev/v3.xfrom
kadraman:dev/v3.x
Apr 21, 2026
Merged

fix: fod dast-scan get-config NPE when DAST Automated scan has not been configured#980
rsenden merged 2 commits intofortify:dev/v3.xfrom
kadraman:dev/v3.x

Conversation

@kadraman
Copy link
Copy Markdown
Contributor

@kadraman kadraman commented Apr 20, 2026

Updated fod dast-scan get-config to catch "unconfigured" DAST Automated configuration for release and prevent NPE. For consistency with other get-config commands now returns an empty descriptor:

---
assessmentTypeId: 0
state: Not configured

This is consistent with other scan behaviour.

Updated fod dast-scan setup-xxx to catch similar HTTP 400 exceptions and display information about why and what fields are locked. Note: currently API does not correctly identify all fields that are locked but the messaging is now more consistent, e.g.:

>fcli fod dast-scan setup-api --assessment-type="DAST Automated" --frequency="Subscription" --type="Postman"  --release 188331 --file my_postman_collection.json
FcliSimpleException: Cannot update DAST Automated scan setup for release id '188331' because scan settings are locked after scans have started. Locked settings: EnvironmentFacing Internal
        at com.fortify.cli.fod.dast_scan.helper.FoDScanConfigDastAutomatedHelper.toSetupException(FoDScanConfigDastAutomatedHelper.java:76)

These behaviours should also make the commands more suitable for use in AI Agents, MCP and/or skills.

Copilot AI review requested due to automatic review settings April 20, 2026 14:08

This comment was marked as outdated.

…if settings are locked.

chore: Updated `fod dast-scan get-config` to return empty descriptor when not setup rather than throw exception.
@rsenden rsenden merged commit 7e84eee into fortify:dev/v3.x Apr 21, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants