Dec
JAN
Feb
10
2021
2022
2023
About this capture
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
T h e W a y b a c k M a c h i n e - h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 2 2 0 1 1 0 1 8 0 1 4 5 / h t t p s : / / g i t h u b . c o m / g i t h u b / c o d e q l / p u l l / 7 4 5 5
S k i p t o c o n t e n t
S i g n up
●
●
F e a t u r e s
●
M o b i l e
●
A c t i o n s
●
C o d e s p a c e s
●
P a c k a g e s
●
S e c u r i t y
●
C o d e r e v i e w
●
I s s u e s
●
I n t e g r a t i o n s
●
G i t H u b S p o n s o r s
●
C u s t o m e r s t o r i e s
●
●
●
●
E x p l o r e G i t H u b
● L e a r n a n d c o n t r i b u t e
●
T o p i c s
●
C o l l e c t i o n s
●
T r e n d i n g
●
L e a r n i n g L a b
●
O p e n s o u r c e g u i d e s
● C o n n e c t w i t h o t h e r s
●
T h e R e a d M E P r o j e c t
●
E v e n t s
●
C o m m u n i t y f o r u m
●
G i t H u b E d u c a t i o n
●
G i t H u b S t a r s p r o g r a m
●
●
●
P l a n s
●
C o m p a r e p l a n s
●
C o n t a c t S a l e s
●
E d u c a t i o n
In this repository
All GitHub
↵
Jump to
↵
No suggested jump to results
{ { m e s s a g e } }
●
N o t i f i c a t i o n s
●
F o r k
8 7 9
S t a r
4 . 1 k
●
C o d e
●
I s s u e s
3 8 8
●
P u l l r e q u e s t s
1 8 2
●
D i s c u s s i o n s
●
A c t i o n s
●
P r o j e c t s
0
●
S e c u r i t y
●
I n s i g h t s
M o r e
●
C o d e
●
I s s u e s
●
P u l l r e q u e s t s
●
D i s c u s s i o n s
●
A c t i o n s
●
P r o j e c t s
●
S e c u r i t y
●
I n s i g h t s
N e w i s s u e
H a v e a q u e s t i o n a b o u t t h i s p r o j e c t ? S i g n u p f o r a f r e e G i t H u b a c c o u n t t o o p e n a n i s s u e a n d c o n t a c t i t s m a i n t a i n e r s a n d t h e c o m m u n i t y .
Email Address
Password
Sign up for GitHub
B y c l i c k i n g “ S i g n u p f o r G i t H u b ” , y o u a g r e e t o o u r t e r m s o f s e r v i c e a n d
p r i v a c y s t a t e m e n t . W e ’ l l o c c a s i o n a l l y s e n d y o u a c c o u n t r e l a t e d e m a i l s .
A l r e a d y o n G i t H u b ?
S i g n i n
t o y o u r a c c o u n t
J u m p t o b o t t o m
O p e n
h a b y 0
w a n t s t o m e r g e
3
c o m m i t s i n t o
g i t h u b : m a i n
C o u l d n o t l o a d b r a n c h e s
B r a n c h n o t f o u n d : { { r e f N a m e } }
C o u l d n o t l o a d t a g s
N o t h i n g t o s h o w
A r e y o u s u r e y o u w a n t t o c h a n g e t h e b a s e ?
S o m e c o m m i t s f r o m t h e o l d b a s e b r a n c h m a y b e r e m o v e d f r o m t h e t i m e l i n e ,
a n d o l d r e v i e w c o m m e n t s m a y b e c o m e o u t d a t e d .
C h a n g e b a s e
f r o m
h a b y 0 : p y / a d d - s h u t i l - m o d u l e - p a t h - i n j e c t i o n - s i n k s
O p e n
h a b y 0
w a n t s t o m e r g e
3
c o m m i t s i n t o
g i t h u b : m a i n
f r o m
h a b y 0 : p y / a d d - s h u t i l - m o d u l e - p a t h - i n j e c t i o n - s i n k s
C o n v e r s a t i o n
17
C o m m i t s
3
C h e c k s
14
F i l e s c h a n g e d
C o n v e r s a t i o n
T h i s f i l e c o n t a i n s b i d i r e c t i o n a l U n i c o d e t e x t t h a t m a y b e i n t e r p r e t e d o r c o m p i l e d d i f f e r e n t l y t h a n w h a t a p p e a r s b e l o w . T o r e v i e w , o p e n t h e f i l e i n a n e d i t o r t h a t r e v e a l s h i d d e n U n i c o d e c h a r a c t e r s .
L e a r n m o r e a b o u t b i d i r e c t i o n a l U n i c o d e c h a r a c t e r s
S h o w h i d d e n c h a r a c t e r s
C o n t r i b u t o r
If the path is controlled by some function calls of the shutil module, it may cause malicious attacks. For example, the rmtree function will delete the specified directory. The move function will move the specified file or move the specified file to the specified location, causing the file content to leak.
The text was updated successfully, but these errors were encountered:
A d d s h u t i l m o d u l e p a t h i n j e c t i o n s i n k s
f e d 1 d 8 8
h a b y 0
r e q u e s t e d a r e v i e w
f r o m
a s a c o d e o w n e r
D e c 2 0 , 2 0 2 1
g i t h u b - a c t i o n s
b o t
a d d e d
t h e
P y t h o n
l a b e l
D e c 2 0 , 2 0 2 1
R a s m u s W L
r e q u e s t e d c h a n g e s
J a n 5 , 2 0 2 2
V i e w c h a n g e s
M e m b e r
T h a n k s 💪
C a n y o u a d d t h e t e s t s t o t h e b o t t o m o f h t t p s : / / g i t h u b . c o m / g i t h u b / c o d e q l / b l o b / c b d 7 4 3 4 a 7 e 5 d 4 8 a 1 6 f 0 a e 5 8 4 0 7 1 1 e f 9 c a b a e 3 9 8 8 / p y t h o n / q l / t e s t / l i b r a r y - t e s t s / f r a m e w o r k s / s t d l i b / F i l e S y s t e m A c c e s s . p y i n s t e a d ? W o u l d b e g r e a t t o s e e t e s t s u s i n g b o t h p o s i t i o n a l a n d k e y w o r d a r g u m e n t s , l i k e t h e r e s t o f t h e t e s t s 😊
B e s i d e s t h a t , j u s t a m i n o r t h i n g a b o u t o n e o f t h e f u n c t i o n s y o u m o d e l e d 😊
Sorry, something went wrong.
p y t h o n / q l / l i b / s e m m l e / p y t h o n / f r a m e w o r k s / S t d l i b . q l l
O u t d a t e d
/**
* A call to the `shutil.copyfileobj` function.
*
* See https://docs.python.org/3/library/shutil.html#shutil.copyfileobj
*/
private class ShutilCopyfileobjCall extends FileSystemAccess:: Range , DataFlow:: CallCfgNode {
ShutilCopyfileobjCall ( ) { this = shutil ( ) .getMember ( "copyfileobj" ) .getACall ( ) }
override DataFlow:: Node getAPathArgument ( ) {
result in [
this .getArg ( 0 ) , this .getArgByName ( "fsrc" ) , this .getArg ( 1 ) , this .getArgByName ( "fdst" )
]
}
}
M e m b e r
T h e r e w a s a p r o b l e m h i d i n g t h i s c o m m e n t .
C h o o s e a r e a s o n f o r h i d i n g t h i s c o m m e n t
T h e r e a s o n w i l l b e d i s p l a y e d t o d e s c r i b e t h i s c o m m e n t t o o t h e r s . L e a r n m o r e .
T h e s e a r g u m e n t s a r e n o t p a t h s , b u t f i l e - l i k e s ( s o a l r e a d y o p e n e d f i l e s ) .
I t h i n k t h e r e i s g o o d v a l u e i n k e e p i n g a n o t e a r o u n d , s o w e c a n e a s i l y r e m e m b e r t h a t t h e r e i s p o t e n t i a l i n m o d e l i n g t h i s f u n c t i o n 😊
S u g g e s t e d c h a n g e
/ * *
* A call to the `shutil.copyfileobj` function.
*
* See https ://docs.python.org/3/library/shutil.html#shutil.copyfileobj
* /
private class ShutilCopyfileobjCall extends FileSystemAccess:: Range , DataFlow:: CallCfgNode {
ShutilCopyfileobjCall ( ) { this = shutil ( ) .getMember ( "copyfileobj" ) .getACall ( ) }
override DataFlow:: Node getAPathArgument ( ) {
result in [
this .getArg ( 0 ) , this .getArgByName ( "fsrc" ) , this .getArg ( 1 ) , this .getArgByName( "fdst" )
]
}
}
// TODO: once we have flow summaries, model `shutil.copyfileobj` which copies the content between its' file-like arguments.
// See https://docs.python.org/3/library/shutil.html#shutil.copyfileobj
Sorry, something went wrong.
C o n t r i b u t o r
A u t h o r
T h e r e w a s a p r o b l e m h i d i n g t h i s c o m m e n t .
C h o o s e a r e a s o n f o r h i d i n g t h i s c o m m e n t
T h e r e a s o n w i l l b e d i s p l a y e d t o d e s c r i b e t h i s c o m m e n t t o o t h e r s . L e a r n m o r e .
D o e s S h u t i l C o p y f i l e o b j C a l l n e e d t o b e d e l e t e d ?
Sorry, something went wrong.
M e m b e r
T h e r e w a s a p r o b l e m h i d i n g t h i s c o m m e n t .
C h o o s e a r e a s o n f o r h i d i n g t h i s c o m m e n t
T h e r e a s o n w i l l b e d i s p l a y e d t o d e s c r i b e t h i s c o m m e n t t o o t h e r s . L e a r n m o r e .
E i t h e r t h a t ( a s i n m y s u g g e s t i o n , w h i c h y o u c a n c o m m i t d i r e c t l y b y a c c e p t i n g t h e s u g g e s t i o n ) , o r b y m a k i n g t h e b o d y o f g e t A P a t h A r g u m e n t ( ) t o b e n o n e ( )
Sorry, something went wrong.
C o n t r i b u t o r
A u t h o r
T h e r e w a s a p r o b l e m h i d i n g t h i s c o m m e n t .
C h o o s e a r e a s o n f o r h i d i n g t h i s c o m m e n t
T h e r e a s o n w i l l b e d i s p l a y e d t o d e s c r i b e t h i s c o m m e n t t o o t h e r s . L e a r n m o r e .
U p d a t e d .
Sorry, something went wrong.
C o n t r i b u t o r
A u t h o r
T h e r e w a s a p r o b l e m h i d i n g t h i s c o m m e n t .
C h o o s e a r e a s o n f o r h i d i n g t h i s c o m m e n t
T h e r e a s o n w i l l b e d i s p l a y e d t o d e s c r i b e t h i s c o m m e n t t o o t h e r s . L e a r n m o r e .
D o y o u t h i n k I c a n a p p l y f o r a b o u n t y n e x t ?
Sorry, something went wrong.
C o n t r i b u t o r
A u t h o r
Besides that, just a minor thing about one of the functions you modeled 😊
I don't quite understand the meaning of this sentence.
Sorry, something went wrong.
M e m b e r
Besides that, just a minor thing about one of the functions you modeled blush
I don't quite understand the meaning of this sentence.
Oh, that was just referring to the inline comment I made.
Sorry, something went wrong.
A d d t h e t e s t o f s h u t i l m o d u l e i n F i l e S y s t e m A c c e s s . p y
0 5 b 0 d a a
R a s m u s W L
r e v i e w e d
J a n 6 , 2 0 2 2
V i e w c h a n g e s
M e m b e r
C a n y o u r e m o v e t h e e n t i r e f i l e p y t h o n / q l / t e s t / q u e r y - t e s t s / S e c u r i t y / C W E - 0 2 2 - P a t h I n j e c t i o n / s h u t i l _ p a t h _ i n j e c t i o n . p y ? S i n c e w e n o w h i g h l i g h t t h a t w e m o d e l t h e s e i n p y t h o n / q l / t e s t / l i b r a r y - t e s t s / f r a m e w o r k s / s t d l i b / F i l e S y s t e m A c c e s s . p y , t h a t i s g o o d e n o u g h 👍
Sorry, something went wrong.
p y t h o n / q l / t e s t / l i b r a r y - t e s t s / f r a m e w o r k s / s t d l i b / F i l e S y s t e m A c c e s s . p y
S h o w r e s o l v e d
H i d e r e s o l v e d
C o n t r i b u t o r
A u t h o r
Can you remove the entire file python/ql/test/query-tests/Security/CWE-022-PathInjection/shutil_path_injection.py? Since we now highlight that we model these in python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py, that is good enough 👍
No problem!
Sorry, something went wrong.
D e l e t e s h u t i l _ p a t h _ i n j e c t i o n . p y f i l e
7 5 9 e c 3 1
R a s m u s W L
a p p r o v e d t h e s e c h a n g e s
J a n 7 , 2 0 2 2
V i e w c h a n g e s
M e m b e r
L G T M 👍
W i l l n e e d t o r u n t e s t s b e f o r e m e r g i n g t h o u g h
Sorry, something went wrong.
C o n t r i b u t o r
A u t h o r
LGTM 👍
Will need to run tests before merging though
Ok. I will try to apply for the bounty next. Do you think it's okay?
Sorry, something went wrong.
M e m b e r
Ok. I will try to apply for the bounty next. Do you think it's okay?
I'm not officially approving/rejecting bounties. If this additional modeling finds real vulnerabilities (that you can show), I don't see why you shouldn't be able to apply for a bounty.
Sorry, something went wrong.
h a b y 0
m e n t i o n e d t h i s p u l l r e q u e s t
J a n 7 , 2 0 2 2
[ < P y t h o n > ] : < A d d s h u t i l m o d u l e s i n k s f o r p a t h i n j e c t i o n q u e r y >
g i t h u b / s e c u r i t y l a b # 5 1 8
O p e n
2 t a s k s
C o n t r i b u t o r
A u t h o r
Ok. I will try to apply for the bounty next. Do you think it's okay?
I'm not officially approving/rejecting bounties. If this additional modeling finds real vulnerabilities (that you can show), I don't see why you shouldn't be able to apply for a bounty.
The application has been submitted.
Sorry, something went wrong.
S i g n u p f o r f r e e
t o j o i n t h i s c o n v e r s a t i o n o n G i t H u b .
A l r e a d y h a v e a n a c c o u n t ?
S i g n i n t o c o m m e n t
RasmusWL
No one assigned
L a b e l s
P y t h o n
No milestone
Successfully merging this pull request may close these issues.
None yet
2 p a r t i c i p a n t s
A d d t h i s s u g g e s t i o n t o a b a t c h t h a t c a n b e a p p l i e d a s a s i n g l e c o m m i t .
T h i s s u g g e s t i o n i s i n v a l i d b e c a u s e n o c h a n g e s w e r e m a d e t o t h e c o d e .
S u g g e s t i o n s c a n n o t b e a p p l i e d w h i l e t h e p u l l r e q u e s t i s c l o s e d .
S u g g e s t i o n s c a n n o t b e a p p l i e d w h i l e v i e w i n g a s u b s e t o f c h a n g e s .
O n l y o n e s u g g e s t i o n p e r l i n e c a n b e a p p l i e d i n a b a t c h .
A d d t h i s s u g g e s t i o n t o a b a t c h t h a t c a n b e a p p l i e d a s a s i n g l e c o m m i t .
A p p l y i n g s u g g e s t i o n s o n d e l e t e d l i n e s i s n o t s u p p o r t e d .
Y o u m u s t c h a n g e t h e e x i s t i n g c o d e i n t h i s l i n e i n o r d e r t o c r e a t e a v a l i d s u g g e s t i o n .
T h i s s u g g e s t i o n h a s b e e n a p p l i e d o r m a r k e d r e s o l v e d .
S u g g e s t i o n s c a n n o t b e a p p l i e d f r o m p e n d i n g r e v i e w s .
S u g g e s t i o n s c a n n o t b e a p p l i e d o n m u l t i - l i n e c o m m e n t s .
●
© 2 0 2 2 G i t H u b , I n c .
● T e r m s
● P r i v a c y
● S e c u r i t y
● S t a t u s
● D o c s
● C o n t a c t G i t H u b
● P r i c i n g
● A P I
● T r a i n i n g
● B l o g
● A b o u t
Y o u c a n ’ t p e r f o r m t h a t a c t i o n a t t h i s t i m e .
Y o u s i g n e d i n w i t h a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .
Y o u s i g n e d o u t i n a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .