Skip to content

Commit

Permalink
Add SAST workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
szsam committed Jul 5, 2023
1 parent f5dae93 commit bb15505
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/sast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
########################
########################
## SAST GitHub Action ##
########################
########################
name: SAST

#######################################
# Start the job on all push to master #
#######################################
on:
push:
pull_request:
branches: ['sast']

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: SAST

# Set the agent to run on
runs-on: ubuntu-latest

permissions:
contents: write

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2

#####################
# Run Deploy script #
#####################
- name: Run SAST check
uses: IvanKuchin/SAST@v1
with:
GITHUB_TOKEN: ${{ github.token }}
env:
LOG_VERBOSE: true

1 comment on commit bb15505

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaws found

Error: encoding error in ./examples/rnn-denoise/mfcc.c
'utf-8' codec can't decode byte 0xa3 in position 1052: invalid start byte

Python3 requires input character data to be perfectly encoded;
it also requires perfectly correct system encoding settings.
Unfortunately, your data and/or system settings are not.
Here are some options:
1. Run: PYTHONUTF8=0 python3 flawfinder
   if your system and and data are all properly set up for
   a non-UTF-8 encoding.
2. Run: PYTHONUTF8=0 LC_ALL=C.ISO-2022 python3 flawfinder
   if your data has a specific encoding such as ISO-2022
   (replace "ISO-2022" with the name of your encoding,
   and optionally replace "C" with your native language).
3. Run: PYTHONUTF8=0 LC_ALL=C.ISO-8859-1 python3 flawfinder
   if your data has an unknown or inconsistent encoding
   (ISO-8859-1 encoders normally allow anything).
4. Convert all your source code to the UTF-8 encoding.
   The system program "iconv" or Python program "cvt2utf" can
   do this (for cvt2utf, you can use "pip install cvt2utf").
5. Run: python2 flawfinder
   (That is, use Python 2 instead of Python 3).
Some of these options may not work depending on circumstance.
In the long term, we recommend using UTF-8 for source code.
For more information, see the documentation.

Please sign in to comment.