Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

agent/rule/callback/waf: always recover panics #145

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

Julio-Guerra
Copy link
Collaborator

Always recover from a panic if any. The use of the package reflect makes it indeed likely
to panic in case of a usage error. Only the function WAF - the WAF that is called when new
parameters are parsed - was recovering from panics.

The general WAF is now recovering from panics if any to make sure the
middlewares cannot panic at that point in case of a mistake. So far, only the
function WAF was safe.
@Julio-Guerra Julio-Guerra added enhancement New feature or request internals Internal feature labels Sep 1, 2020
@Julio-Guerra Julio-Guerra added this to the v0.14.0 milestone Sep 1, 2020
@Julio-Guerra Julio-Guerra self-assigned this Sep 1, 2020
@Julio-Guerra Julio-Guerra merged commit 449b8f3 into dev Sep 1, 2020
@Julio-Guerra Julio-Guerra deleted the fix/waf-panic-zero-value branch September 1, 2020 10:03
@Julio-Guerra Julio-Guerra mentioned this pull request Sep 2, 2020
Julio-Guerra pushed a commit that referenced this pull request Sep 2, 2020
New Feature

- (#142) RASP: add Shellshock protection support. This protection is currently
  attached to `os.StartProcess()` which is the common function of the Go
  standard library to execute a process. This protection can be configured at
  <https://my.sqreen.com/application/goto/modules/rasp/details/shellshock>.

Fixes

- (#145) In-App WAF: always recover from panics as this in the way the `reflect`
  package handles usage errors.

- (#144) Backend client: avoid dropping HTTP traces in case of `Host` header
  parsing errors.
Julio-Guerra pushed a commit that referenced this pull request Sep 2, 2020
New Feature:

- (#142) RASP: add Shellshock protection support. This protection is currently
  attached to `os.StartProcess()` which is the common function of the Go
  standard library to execute a process. This protection can be configured at
  <https://my.sqreen.com/application/goto/modules/rasp/details/shellshock>.

Fixes:

- (#145) In-App WAF: always recover from panics as this in the way the `reflect`
  package handles usage errors.

- (#144) Backend client: avoid dropping HTTP traces in case of `Host` header
  parsing errors.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request internals Internal feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant