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

allow specifying self-contained at http request level #4812

Merged
merged 7 commits into from Mar 1, 2024

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Feb 27, 2024

Proposed Changes

id: stripe-secret-key

info:
  name: Stripe Secret Key
  author: DhiyaneshDk
  severity: high
  tags: exposure,token,stripe

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        name: token
        regex:
          - 'sk_(?:live|test)_[0-9a-zA-Z]{24}'
        internal: true

  - raw:
      - |
        @Host: https://api.stripe.com:443
        GET /v1/charges?limit=1 HTTP/1.1
        Host: api.stripe.com
        Authorization: Bearer {{token}}

    self-contained: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "billing_details")'
        condition: and

Note

  • this feature i.e specifying self-contained true at request level does not break / change any behaviour of existing templates and only acts as override of sorts at http protocol / request level
  • specifying self-contained: true at global / template level marks all proto requests in template as self-contained while specifying it at http request only affects that http request[s]

@tarunKoyalwar tarunKoyalwar self-assigned this Feb 27, 2024
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review February 27, 2024 18:16
@tarunKoyalwar tarunKoyalwar changed the title allow specifying self-contained at requestlevel allow specifying self-contained at http request level Feb 27, 2024
@ehsandeep ehsandeep merged commit 8a2ff17 into dev Mar 1, 2024
12 checks passed
@ehsandeep ehsandeep deleted the issue-4788-flow-self-contained branch March 1, 2024 11:08
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.

Issue with SMTP Module and examples in js modules doc Issue with self contained + request annotation in flow
2 participants