Skip to content

Update functional test workflow and add RSpec tests for XSS challenge#666

Merged
hahwul merged 4 commits intomainfrom
ci/issue-663
Mar 15, 2025
Merged

Update functional test workflow and add RSpec tests for XSS challenge#666
hahwul merged 4 commits intomainfrom
ci/issue-663

Conversation

@hahwul
Copy link
Owner

@hahwul hahwul commented Mar 14, 2025

Modify the functional test workflow to support manual triggering and introduce basic RSpec tests for the XSS game challenge.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @hahwul, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request modifies the functional test workflow to allow manual triggering and adds basic RSpec tests for the XSS game challenge. The workflow change disables the automatic triggering of the functional tests on push and pull requests, enabling manual triggering via workflow_dispatch. The new RSpec tests in spec/challenges/xss-game.appspot.com/challenge_spec.rb introduce a basic test case for level 1 of the XSS game, using dalfox to check for vulnerabilities.

Highlights

  • Workflow Modification: The functional test workflow is updated to support manual triggering using workflow_dispatch, disabling automatic triggers on push and pull requests.
  • RSpec Tests: Basic RSpec tests are added for the XSS game challenge, specifically targeting level 1 and using dalfox for vulnerability checks.

Changelog

  • .github/workflows/test-functional.yml
    • The on trigger is modified to use workflow_dispatch instead of push and pull_request to enable manual triggering of the workflow. Lines 4, 5, 6, 7, and 8 were changed.
  • spec/challenges/xss-game.appspot.com/challenge_spec.rb
    • A new RSpec test file is added to test the XSS game challenge.
    • The test checks level 1 of the XSS game using dalfox to identify vulnerabilities.
    • The test expects to find a vulnerability ([V]) in the output and confirms the command executes successfully.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Trivia time!

What does XSS stand for and what type of vulnerability is it?

Click here for the answer
XSS stands for Cross-Site Scripting. It is a type of computer security vulnerability typically found in web applications. XSS enables attackers to inject client-side scripts into web pages viewed by other users.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@hahwul hahwul self-assigned this Mar 14, 2025
@gemini-code-assist
Copy link
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@hahwul hahwul linked an issue Mar 14, 2025 that may be closed by this pull request
@hahwul hahwul marked this pull request as ready for review March 15, 2025 07:41
@hahwul hahwul merged commit fb9bbe9 into main Mar 15, 2025
@hahwul hahwul deleted the ci/issue-663 branch March 15, 2025 07:43
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.

Challenge - XSS Game

1 participant