Skip to content

Conversation

@StacieClark-Elastic
Copy link
Member

Proposed commit message

New Integration for Qualys Web Application Scanning

  • This application makes API calls to a Qualys Web Application scanning service for vulnerability detections then augments the detections with data from API calls to the Qualys Knowledge base for information about the vulnerability detected.
@StacieClark-Elastic StacieClark-Elastic requested a review from a team as a code owner June 3, 2025 20:49
@StacieClark-Elastic StacieClark-Elastic added the New Integration Issue or pull request for creating a new integration package. label Jun 3, 2025
@StacieClark-Elastic StacieClark-Elastic requested a review from a team as a code owner June 3, 2025 20:49
@StacieClark-Elastic StacieClark-Elastic added Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:qualys_was Qualys Web Application Scanning (WAS) labels Jun 3, 2025
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@efd6
Copy link
Contributor

efd6 commented Jun 4, 2025

Do the test expectations need to be updated or is there a breakage?

@andrewkroh andrewkroh added the dashboard Relates to a Kibana dashboard bug, enhancement, or modification. label Jun 4, 2025
@StacieClark-Elastic StacieClark-Elastic marked this pull request as draft June 4, 2025 22:49
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@StacieClark-Elastic StacieClark-Elastic marked this pull request as ready for review June 5, 2025 20:53
@StacieClark-Elastic StacieClark-Elastic requested a review from efd6 June 5, 2025 20:56
if: ctx.Finding != null && ctx.Finding.knowledge_base != null && ctx.Finding.knowledge_base.size() > 0
tag: pipeline_knowledge_base
ignore_missing_pipeline: true
on_failure:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
on_failure:
- set:
field: event.kind
value: pipeline_error
tag: set_pipeline_error_into_event_kind
if: ctx.error?.message != null
- append:
field: tags
value: preserve_original_event
allow_duplicates: false
if: ctx.error?.message != null
on_failure:

There are processors above that can error without failing, so we need to condition the document for retaining the event.original in those cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why I resolve this. There are still cases where this has merit. Maybe remove the set event.kind, but the preserve_original_event into tags is needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the comment wrong. I originally put the change after on_failure.
The way I've written the ingest, I don't want it to fail if error.message has been written into by a on_failure nodes in the processor. I added in the append for the tag.

@StacieClark-Elastic StacieClark-Elastic force-pushed the feature/qualys-was-13569 branch 2 times, most recently from 6454049 to fbe8418 Compare June 16, 2025 12:03
@StacieClark-Elastic StacieClark-Elastic requested a review from efd6 June 17, 2025 19:00
@StacieClark-Elastic StacieClark-Elastic force-pushed the feature/qualys-was-13569 branch 2 times, most recently from 2a8085d to efecdff Compare June 18, 2025 18:55
@StacieClark-Elastic StacieClark-Elastic enabled auto-merge (squash) June 18, 2025 20:58
Comment on lines 46 to 48
(has(state.vulnerability_filter) ? state
:
state.with(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conventional form for multiline ternaries is

condition_expression ? true_branch_expression : false_branch_expression 

In cases where there is a zero avaluation (e.g. {} here) this has been historically

condition_expression ? {} : false_branch_expression 

but this is not recognised by celfmt, so these will go away when that is more widely rolled out, and I am not convinced that state is a zero.

Note that the branches are indented relative to the ternary syntax and the : is aligned with the condition expression. Exact indentation is not yet formalised, but will most likely resolve to two spaces to match the YAML convention used here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take another look at the program after the indentation is fixed up.

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes only.

if: ctx.Finding != null && ctx.Finding.knowledge_base != null && ctx.Finding.knowledge_base.size() > 0
tag: pipeline_knowledge_base
ignore_missing_pipeline: true
on_failure:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why I resolve this. There are still cases where this has merit. Maybe remove the set event.kind, but the preserve_original_event into tags is needed.

"Body": state.Body.encode_json(),
}
).do_request().as(resp, (resp.StatusCode == 200) ?
try(bytes(resp.Body).decode_json(), "decode_error").as(body,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try(bytes(resp.Body).decode_json(), "decode_error").as(body,
try(resp.Body.decode_json(), "decode_error").as(body,
(size(resp.Body) != 0) ?
string(resp.Body)
:
" no body "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" no body "
"no body"
initial draft for qualys_was. An agentless integration for ingesting web application scanning data
Added system tests. Added another pipeline test
Updated changelog.yml with correct PR number
added package to CODEOWNERS file
Rolled back accidental change to qualys_vmdr integration README
Added back line in default.yml that had been accidentally deleted
Added images of dashboards. Cleanup work to make files adhere to style standards
Cleaned up README
Inverted the branches in 2 places
Restructured cel.yml.hbs file to be easier to read and understand
Suggested changes from review for documentation.
Added comments to CEL script
Changed result_list to type text and do not index it
Removed out of date integrations page screenshot.
Adds original event tag if there is an error
Restored file that should not have been changed
Reformatted the cel script. Fixed an error in the readme. Fixed the regex for the system test config
Added some more documentation about scan history purging
Included information about scan history being returned in ther 3.20 API and before
Updated generated README
@StacieClark-Elastic StacieClark-Elastic force-pushed the feature/qualys-was-13569 branch from 6f5c26c to 52114e7 Compare June 24, 2025 22:47
@elasticmachine
Copy link

💚 Build Succeeded

History

@StacieClark-Elastic StacieClark-Elastic requested a review from efd6 June 24, 2025 23:29
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@StacieClark-Elastic StacieClark-Elastic merged commit dacae63 into elastic:main Jun 25, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package qualys_was - 0.1.0 containing this change is available at https://epr.elastic.co/package/qualys_was/0.1.0/

shmsr pushed a commit to shmsr/integrations that referenced this pull request Jun 30, 2025
…_was) (elastic#14139) New Integration for Qualys Web Application Scanning This application makes API calls to a Qualys Web Application scanning service for vulnerability detections then augments the detections with data from API calls to the Qualys Knowledge base for information about the vulnerability detected.
@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:qualys_was Qualys Web Application Scanning (WAS) New Integration Issue or pull request for creating a new integration package. Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

5 participants