Skip to content

Commit

Permalink
Fix code security scanner
Browse files Browse the repository at this point in the history
Summary: - As title

Reviewed By: mbhatt1

Differential Revision: D54151258

fbshipit-source-id: f11ae9c7d53250e23e99506dc6ed1aa600153cd1
  • Loading branch information
csahana95 authored and SimonWan committed Feb 27, 2024
1 parent 8793986 commit b3ff4e6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CybersecurityBenchmarks/insecure_code_detector/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from __future__ import annotations

import enum


Expand Down Expand Up @@ -49,3 +51,17 @@ def get_file_extension(language: Language) -> str:
return extension_map[language]
else:
raise ValueError("Unknown language")


def get_supported_languages() -> list[Language]:
supported_languages = [
Language.C,
Language.CPP,
Language.CSHARP,
Language.JAVA,
Language.JAVASCRIPT,
Language.PHP,
Language.PYTHON,
Language.RUST,
]
return supported_languages

0 comments on commit b3ff4e6

Please sign in to comment.