Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$30] Security Issue - JD Edits from TaaS App #125

Closed
wdprice opened this issue Feb 25, 2021 · 19 comments
Closed

[$30] Security Issue - JD Edits from TaaS App #125

wdprice opened this issue Feb 25, 2021 · 19 comments

Comments

@wdprice
Copy link

wdprice commented Feb 25, 2021

Jobs that have a Job Application Form attribute = true in RCRM are posted directly to the Topocder.com Gig Work page. In scenarios where that field is true, a user in TaaS App could write anything and post directly to Topcoder.com without review. We cannot allow this behavior to occur.

Proposed Solution

  1. Add a new boolean to Jobs API & database: isApplicationPageActive
  2. Update Zapier integration to update this field whenever it is edited in RecruitCRM. Do not allow this field to be edited inside TaaS App UI or though API (except m2m).
  3. Add logic to Job Edit page: IF isApplicationPageActive == true THEN disable the Job Description editor. Display a message underneath that reads: "You may not edit a Job Description that is currently posted to Topcoder.com. Please contact [email protected]."
@wdprice wdprice added bug Something isn't working P2 labels Feb 25, 2021
@wdprice wdprice added this to the v1.5.1 - Post Release Bugfix milestone Feb 25, 2021
@wdprice
Copy link
Author

wdprice commented Feb 25, 2021

@maxceem @nkumar-topcoder - read above. I think the solution outlined should support the scenario. Interested in your thoughts.

@maxceem
Copy link
Contributor

maxceem commented Feb 25, 2021

@wdprice solution looks right to me.

@maxceem
Copy link
Contributor

maxceem commented Feb 25, 2021

@wdprice please, let me know if this is confirmed, and we may start working on this.

@maxceem maxceem added the question Further information is requested label Feb 25, 2021
@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@wdprice @nkumar-topcoder what about existent jobs records? Should we set this value false to all of them so the Description could be edited? Or should we set true to all existent records so the Description could not be edited?

Or is there any criteria that we can use when updating existent data so we can set the value depends on something which indicates if the Job was posted or no?

If there is no such indicator, but this value is important to us, we can try creating migration script which would load information about the jobs from RCRM API and check if it's activated or no. Or we might import data to JSON, and create a script that would use JSON to set this value for jobs, but such a list of jobs should be fresh so it includes all the jobs.

@wdprice
Copy link
Author

wdprice commented Feb 26, 2021

Set to false be default.

A script would be a great option, or we can also do minor updates to everything with active flags to force sync.

@wdprice
Copy link
Author

wdprice commented Feb 26, 2021

@maxceem I just checked and their Job table export includes this information, so I can provide a dump w/ Job slug + isApplicationPageActive

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

A script would be a great option, or we can also do minor updates to everything with active flags to force sync.

If there are not so many active jobs, then triggering sync manually could be easier. I guess script would be not so easy to create as providing demo access for a developer is not easy. And importing/sanitizing JSON data also takes effort.

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@wdprice if it's easy to provide such a dump, then sure, please provide and we would create a script then.

@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

Sum up:

  • If isApplicationPageActive is true then disable description editor

    image

    • note, that we should be able to scroll the content inside the editor but should not be able to edit it
    • if the editor doesn't have a feature to "disable" it, then we can show the TuiViewer instead of the editor when the editor is disabled. But make sure that we don't add some special logic to the Form. So if we need to display Viewer, then still pass disabled={true} to the form and only inside MarkDownEditor if disabled===true then show MarkdownViewer. But make the height the same like the editor with the scrollbar, so we don't show the long text like we do on the Job View page.

@maxceem maxceem changed the title Security Issue - JD Edits from TaaS App [$30] Security Issue - JD Edits from TaaS App Mar 2, 2021
@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

Challenge https://www.topcoder.com/challenges/65521df7-adfe-4fbc-99b8-22ab140aa9ce has been created for this ticket.

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

@yoution this is open for pickup.

Job for testing with isApplicationPageActive=true https://platform.topcoder-dev.com/taas/myteams/111/positions/4a996ad0-6ac9-4133-95ae-4abbc9db2f75/edit

@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

@yoution there is one more requirement:

  • Display a message underneath that reads: "You may not edit a Job Description that is currently posted to Topcoder.com. Please contact [email protected]." when the Job Description is disabled.

We should implement it a good way, so still using our current from config. Do you have any good ideas how?

@yoution
Copy link
Contributor

yoution commented Mar 2, 2021

@bug-bash-helper assign me

@bug-bash-hunt-helper
Copy link

@yoution 🛑 this issue is not included in the Bug Bash.

You may only pickup issues which are included in this Bug Bash and open for pick up.
Such issues have open status and have labels CF and Open for Pickup.

@yoution
Copy link
Contributor

yoution commented Mar 2, 2021

@maxceem please assign me

@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

Challenge https://www.topcoder.com/challenges/65521df7-adfe-4fbc-99b8-22ab140aa9ce has been assigned to yoution.

This is an automated message for maxceem via Topcoder X

yoution added a commit to yoution/taas-app that referenced this issue Mar 2, 2021
@maxceem maxceem removed the question Further information is requested label Mar 2, 2021
maxceem added a commit that referenced this issue Mar 2, 2021
@maxceem maxceem closed this as completed Mar 2, 2021
@maxceem maxceem reopened this Mar 2, 2021
@maxceem
Copy link
Contributor

maxceem commented Mar 2, 2021

Payment task has been updated: https://www.topcoder.com/challenges/65521df7-adfe-4fbc-99b8-22ab140aa9ce
Payments Complete
Winner: yoution
Copilot: maxceem
Challenge 65521df7-adfe-4fbc-99b8-22ab140aa9ce has been paid and closed.

This is an automated message for maxceem via Topcoder X

@maxceem maxceem added question Further information is requested Ready for DEV QA labels Mar 2, 2021
@sandhiyakavi
Copy link
Collaborator

Verified on Dev Env. The Job description field is not editable after Enabling the Job application form and isApplicationPageActive field changed to true

image

image

@sandhiyakavi
Copy link
Collaborator

Verified on Prod. Working as expected.

image
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants