Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
cwe_checker
Commits
08b72f67
Unverified
Commit
08b72f67
authored
Aug 28, 2023
by
Enkelmann
Committed by
GitHub
Aug 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit acceptance tests to PRs to the master branch (#426)
parent
f873345f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
6 deletions
+8
-6
acceptance-tests.yml
.github/workflows/acceptance-tests.yml
+2
-0
README.md
README.md
+2
-2
symbol_calls.rs
...b/src/analysis/string_abstraction/context/symbol_calls.rs
+1
-1
state.rs
src/cwe_checker_lib/src/checkers/cwe_119/state.rs
+1
-1
arguments.rs
src/cwe_checker_lib/src/utils/arguments.rs
+1
-1
log.rs
src/cwe_checker_lib/src/utils/log.rs
+1
-1
No files found.
.github/workflows/acceptance-tests.yml
View file @
08b72f67
...
...
@@ -5,6 +5,8 @@ on:
branches
:
-
master
pull_request
:
branches
:
-
master
env
:
CARGO_TERM_COLOR
:
always
...
...
README.md
View file @
08b72f67
...
...
@@ -3,8 +3,8 @@
</p>
# cwe_checker #
![
Acceptance tests
](
https://github.com/fkie-cad/cwe_checker/actions/workflows/acceptance-tests.yml/badge.svg
)
![
Unit tests
](
https://github.com/fkie-cad/cwe_checker/actions/workflows/unit-tests.yml/badge.svg
)
![
Acceptance tests
](
https://github.com/fkie-cad/cwe_checker/actions/workflows/acceptance-tests.yml/badge.svg
?branch=master
)
![
Unit tests
](
https://github.com/fkie-cad/cwe_checker/actions/workflows/unit-tests.yml/badge.svg
?branch=master
)
![
Docker-Pulls
](
https://img.shields.io/docker/pulls/fkiecad/cwe_checker.svg
)
[
![Documentation
](
https://img.shields.io/badge/doc-stable-green.svg
)
](https://fkie-cad.github.io/cwe_checker/index.html)
...
...
src/cwe_checker_lib/src/analysis/string_abstraction/context/symbol_calls.rs
View file @
08b72f67
...
...
@@ -101,7 +101,7 @@ impl<'a, T: AbstractDomain + DomainInsertion + HasTop + Eq + From<String>> Conte
/// Regex that filters format specifier from a format string.
pub
fn
re_format_specifier
()
->
Regex
{
Regex
::
new
(
r
#
"
%\
d{0,2}([c,C,d,i,o,u,x,X,e,E,f,F,g,G,a,A,n,p,s,S]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"
#
)
.expect
(
"No valid regex!"
)
Regex
::
new
(
r
"
%\
d{0,2}([c,C,d,i,o,u,x,X,e,E,f,F,g,G,a,A,n,p,s,S]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"
)
.expect
(
"No valid regex!"
)
}
/// Merges domains from multiple pointer targets. The merged domain serves as input to a format string.
...
...
src/cwe_checker_lib/src/checkers/cwe_119/state.rs
View file @
08b72f67
...
...
@@ -261,7 +261,7 @@ fn collect_tids_for_cwe_warning(
&
caller_tid
,
state
.stack_id
.get_tid
(),
);
tids
.extend
(
call_sequence_tids
.into_iter
()
);
tids
.extend
(
call_sequence_tids
);
}
// Build a string out of the TID list
tids
.iter
()
...
...
src/cwe_checker_lib/src/utils/arguments.rs
View file @
08b72f67
...
...
@@ -64,7 +64,7 @@ pub fn parse_format_string_parameters(
// - `[\.]?\d*` matches the precision parameter (for printf-like functions)
// - `[cCdiouxXeEfFgGaAnpsS]` matches a format specifier without length parameter.
// - `hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA` matches format specifiers with length parameter.
let
re
=
Regex
::
new
(
r
#
"
%
[+
\
-#0]{0,1}
\
d*[
\
.]?
\
d*([cCdiouxXeEfFgGaAnpsS]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"
#
)
let
re
=
Regex
::
new
(
r
"
%
[+
\
-#0]{0,1}
\
d*[
\
.]?
\
d*([cCdiouxXeEfFgGaAnpsS]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"
)
.expect
(
"No valid regex!"
);
let
datatype_map
:
Vec
<
(
Datatype
,
ByteSize
)
>
=
re
...
...
src/cwe_checker_lib/src/utils/log.rs
View file @
08b72f67
...
...
@@ -371,7 +371,7 @@ impl LogThread {
let
logs
=
logs_with_address
.values
()
.cloned
()
.chain
(
general_logs
.into_iter
()
)
.chain
(
general_logs
)
.collect
();
let
cwes
=
collected_cwes
.into_values
()
.collect
();
(
logs
,
cwes
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment