Twisted Fate
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Hazard Analysis **Team 12, CodeChamp - SWFRENG 4G06** - Anton Kanugalawattage - Dipendra Subedi - Youssef Rizkalla - Tamas Leung - Zhiming Zhao # Table of Contents 1. [Introduction](#Introduction) 2. [Background](#Background) 3. [Scope and Purpose of Hazard Analysis](#Scope-and-Purpose-of-Hazard-Analysis) 4. [System Boundary](#System-Boundary) 5. [Definition of Hazard](#Definition-of-Hazard) 6. [Critical Assumptions](#Critical-Assumptions) 7. [Failure Modes & Effects Analysis](#Failure-Modes-and-Effects-Analysis) 6.1. [Hazards Out of Scope](#Hazards-Out-of-Scope) 6.2. [Failure Modes and Effects Analysis Table](#Failure-Modes-and-Effects-Analysis-Table) 8. [Safety & Security Requirements](#Safety-and-Security-Requirements) 7.1. [Access Requirements](#Access-Requirements) 7.2. [Integrity Requirements](#Integrity-Requirements) 7.3. [Privacy Requirements](#Privacy-Requirements) 7.4. [Audit Requirements](#Audit-Requirements) 7.5. [Immunity Requirements](#Immunity-Requirements) 9. [Roadmap](#Roadmap) # List of Tables 1. [Revision History](#Revision-History) 2. [Failure Modes & Effects Analysis Table](#Failure-Modes-and-Effects-Analysis-Table) # List of Figures N/A # Revision History | Date | Developers | Change | |------|------------|--------| | 10/18/2022 | <ul><li> Anton Kanugalawattage</li><li>Dipendra Subedi</li><li>Youssef Rizkalla</li><li>Tamas Leung</li><li>Zhiming Zhao</li></ul> | Initial Document | Table 1: Failure Modes and Effects Analysis # Introduction To ensure the system that is built hazard free, potential problematic behaviours must be identified. This document aims to outline the hazard analysis of CodeChamp and to build a roadmap for achieving that goal. # Background CodeChamp is a online collaborative web platform used to learn data structure and algorithms. # Scope and Purpose of Hazard Analysis The scope of a hazard analysis is to identify possible hazards from each component of the system, and the purpose of a hazard analysis is to document hazards, the cause and effect of each hazard and how to mitigate each hazard. # System Boundary Hazard analysis will be conducted on the following components of CodeChamp: 1. Judge Server 2. Connected Communication 3. Database 4. Authentication 5. Deployment The system boundary includes five components of the application. The judge server, connected communication service, the database, authentication service, and deployment service. The reliability of the database and deployment services in terms of up time is out of the control of CodeChamp. These play a role in ensuring appropriate data store and uptime of the web application, so they are necessary to be included in the hazard analysis. # Definition of Hazard The definition of a hazard used throughout this document is anything that poses a threat to the security, performance, or functionality of the CodeChamp web application. # Critical Assumptions There are no critical assumptions being made. # Failure Modes and Effects Analysis The Failure Modes and Effects Analysis model was chosen to identify and analyze the system's hazards as well as to define recommended actions and requirements to mitigate them. ## Hazards Out of Scope 1. Deployment issues and outages by the Cloud Provider 2. Database provider outages 3. Failures of the External Identity Management System These hazards are not managed directly the developers, so our system cannot be directly responsible for them. In the case of hazards, we can attempt to minimize their effects but cannot completely mitigate them. ## Failure Modes and Effects Analysis Table | Component | Failure Modes | Effects of Failure | Causes of Failure | Recommended Action | SR | Ref | |-----------|---------------|--------------------|-------------------|--------------------|----|-----| | Judge Server| Server Outage | Denial of Service | <ol><li> Execution of malicious user code</li> <li> Failure to timeout code beyond specified time limit</li></ol> | Ensure that code is checked before compilation, similar to accounting for a SQL injection attack. Enforce a time and memory limit for each problem. | [IR4](#Integrity-Requirements) & [AR2](#Access-Requirements) | HR1 | | Connected Communications | Loss of connections | Communcation between server and clients are lost. | <ol><li> Unintentional server restart</li><li> Loss/out of memory</li></ol> | Backup states of the current connections to be used when restarting. | [IR5](#Integrity-Requirements) | HR2 | | Database |Data Deleted|All data is lost. No problems will be able to be sent to users. No profile information can be viewed|<ol><li>SQL injection attacks</li><li>Unintentional deletes</li></ol>|Maintain automatic backups and restore database to latest backup version| [IR1](#Integrity-Requirements) & [IR2](#Integrity-Requirements) | HR3 | | Database |Overload of database IO|Server requests will be slowed drastically|<ol><li>Too many requests</li></ol>|Automatic scalling of database | [IR6](#Integrity-Requirements) | HR4 | | Server |Overload of server|Server requests will be slowed drastically|<ol><li>Too many client requests</li></ol>|<ol><li>Rate Limiting</li><li>Automatic Vertical Scaling of servers</li></ol>| [IR7](#Integrity-Requirements) | HR5 | | Authentication | Unauthenicated use of services | <ol><li>Services are used without an identity, preventing the system from logging events</li><li>Jeapordizes the integrity of the games the user participates in</li></ol>|<ol><li>Failure of the external Identiy Management system </li><li>Failure of authentiaction middleware in the server</li></ol> | Safeguard the authentiaction middleware so that on failure all requests are rejected. | [AR1](#Access-Requirements) & [AR2](#Access-Requirements) | HR6 | | Authentication | Failure to login to service | Users are unable to use service|<ol><li>Failure of the external Identiy Management system </li><li>Failure of authentiaction middleware in the server</li></ol> | Safeguard the authentiaction middleware so that on failure all requests are rejected. | [AR3](#Access-Requirements) | HR7 | <center>Table 2: Failure Modes and Effects Analysis</center> # Safety and Security Requirements ## Access Requirements - AR1 - Users must be logged in to view data they are authorized for - AR2 - Only admins will be allowed to modify and add new problem data - AR3 - Requests from unauthenticated users should be rejected ## Integrity Requirements - IR1 - Problem data will be automatically back up on a weekly basis - IR2 - User profile data will be automatically back up on a daily basis - IR3 - User data will not be modified - IR4 - All problems must have a time and memory limit set - IR5 - Backup connection state every minute to ensure connectivity on restart - IR6 - Clients will be rate-limited on requests to the server - IR7 - Distribute connection/requests evenly among servers ## Privacy Requirements - PR1 - Users will not be able to access unauthorized data of other users ## Audit Requirements N/A ## Immunity Requirements N/A # Roadmap The hazard analysis has brought forward more requirements that will be implemented within the final application. We will try to implement all requirements based on priority, but may not be able to due to time constraints of the projects. As we approach the end of the project, the hazard analysis will be revisited, to see the hazards that were mitigated, and those which still persist or require additional work.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully