Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional builtin variables #245

Merged

Conversation

richardmarshall
Copy link
Collaborator

Adds implementation for undocumented built-in variables:

  • fastly_info.h2.fingerprint
  • fastly_info.request_id
  • client.sess_timeout

Additional fixes

  • Fixes some interpreter typos related to legacy WAF.
  • Fixes issue with generating set code for legacy WAF variables waf.php_injection_score and waf.rce_score.
  • Adds seemingly undocumented backend probe property .url. It is difficult to show confirmation that this property is valid since the fiddle tool doesn't allow VCL definitions of backends so see attached screenshot.

Screenshot of Fastly console showing no errors with activated service using .url probe value:
Screenshot 2024-01-22 21 57 05

Copy link
Owner

@ysugimoto ysugimoto left a comment

Choose a reason for hiding this comment

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

Nice catch 👍 and put tiny comments about settable waf related variable.

case WAF_FAILURES,
"waf.php_injection_score",
"waf.rce_score":
case WAF_FAILURES, WAF_PHP_INJECTION_SCORE, WAF_RCE_SCORE:
Copy link
Owner

Choose a reason for hiding this comment

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

According to waf.php_injection_score and waf.rce_score , waf.php_injection_score and waf.rce_score could be set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for noticing that! I had fixed the typo in predefined.yml but forgot to actually make the related changes in the interpreter. Done.

@ysugimoto
Copy link
Owner

@richardmarshall Thanks! This PR should be merged 👍

@ysugimoto ysugimoto merged commit 0372a05 into ysugimoto:main Jan 24, 2024
1 check 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.

2 participants