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

Not able to mask the payload and header with secret() method for REST and setCookie so that they are displayed in Allure report #4622

Open
AugustineAutoGit opened this issue Dec 4, 2024 · 8 comments · May be fixed by allure-framework/allure-js#1208

Comments

@AugustineAutoGit
Copy link

What are you trying to achieve?

Need to mask the payload and Headers in REST and setCookie that may contain sensitive information

What do you get instead?

Not able to mask the payload and header with secret() method. Hence the value is shown in Allure report.
image

@AugustineAutoGit
Copy link
Author

@kobenguyent could you please have a look?

@kobenguyent
Copy link
Collaborator

hey @AugustineAutoGit per my knowledge, that thing shall be resolved by allure plugin quickly. Not sure if this shall be handled by codeceptjs, as those test files are generated by allure plugin.

@AugustineAutoGit
Copy link
Author

hi @kobenguyent
But those steps are generated by CodeceptJS, like Allure plugin receives them from CodeceptJS only right?
if the secret() method masking was working fine, then Allure will not get unmasked values.
Also while in running with '--verbose', secret method is not masking as value are seen in logs as well.
In the below screenshot I masked the payload, like 'I.sendPostRequest('/api/users.json', secret({ "email": "[email protected]" }));', but it's still visible
image

@kobenguyent
Copy link
Collaborator

kobenguyent commented Dec 5, 2024

I could be wrong, but I think that, the proper way is that codeceptjs exposes the Step info as it is, the logs, plugins, etc shall mask the sensitive data as they desire. what do you think @DavertMik @AugustineAutoGit ?

@AugustineAutoGit
Copy link
Author

I could be wrong, but I think that, the proper way is that codeceptjs exposes the Step info as it is, the logs, plugins, etc shall mask the sensitive data as they desire. what do you think @DavertMik @AugustineAutoGit ?

@kobenguyent
yes, but issue I am facing is the masking is not happening for REST

@AugustineAutoGit
Copy link
Author

@kobenguyent meanwhile do you have any boilerplate example repository which have used CodeceptJS with Feature files(Gherkin) and Playwright along with Allure report: allure-codeceptjs not the legacy: @codeceptjs/allure-legacy

@gkushang
Copy link
Contributor

gkushang commented Dec 5, 2024

+100 to this request. The output library prints the Tokens when I.sendGetRequest or similar function is called with --verbose or --debug flag. Even with secret function, it's printed

@AugustineAutoGit
Copy link
Author

+100 to this request. The output library prints the Tokens when I.sendGetRequest or similar function is called with --verbose or --debug flag. Even with secret function, it's printed

@gkushang
do you have any boilerplate example repository which have used CodeceptJS with Feature files(Gherkin) and Playwright along with Allure report: allure-codeceptjs not the legacy: @codeceptjs/allure-legacy
?

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 a pull request may close this issue.

3 participants