Eval Begone! Semi-Automated Removal of Eval from Java']JavaScript Programs

被引:24
|
作者
Meawad, Fadi [1 ]
Richards, Gregor [1 ]
Morandat, Floreal [1 ]
Vitek, Jan [1 ]
机构
[1] Purdue Univ, W Lafayette, IN 47907 USA
关键词
Languages; Dynamic Languages; !text type='Java']Java[!/text]Script; Reflection; Dynamic Analysis;
D O I
10.1145/2398857.2384660
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Eval endows JavaScript developers with great power. It allows developers and end-users, by turning text into executable code, to seamlessly extend and customize the behavior of deployed applications as they are running. With great power comes great responsibility, though not in our experience. In previous work we demonstrated through a large corpus study that programmers wield that power in rather irresponsible and arbitrary ways. We showed that most calls to eval fall into a small number of very predictable patterns. We argued that those patterns could easily be recognized by an automated algorithm and that they could almost always be replaced with safer JavaScript idioms. In this paper we set out to validate our claim by designing and implementing a tool, which we call Evalorizer, that can assist programmers in getting rid of their unneeded evals. We use the tool to remove eval from a real-world website and validated our approach over logs taken from the top 100 websites with a success rate over 97% under an open world assumption.
引用
收藏
页码:607 / 620
页数:14
相关论文
共 50 条
  • [21] On semi-automated extraction of causal networks from raw text
    Sheikh, Solat J.
    Haider, Sajjad
    Levis, Alexander H.
    [J]. ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE, 2023, 123
  • [22] Semi-Automated Information Extraction from Unstructured Threat Advisories
    Ramnani, Roshni R.
    Shivaram, Karthik
    Sengupta, Shubhashis
    Annervaz, K. M.
    [J]. PROCEEDINGS OF THE 10TH INNOVATIONS IN SOFTWARE ENGINEERING CONFERENCE, 2017, : 181 - 187
  • [23] A semi-automated protocol for Archaea DNA extraction from stools
    Khelaifia S.
    Ramonet P.-Y.
    Bedotto Buffet M.
    Drancourt M.
    [J]. BMC Research Notes, 6 (1)
  • [24] Semi-automated Detection of Single Cell Signatures from a Dielectrophoretic Cytometer
    Rizi, Bahareh Saboktakin
    Bhide, Ashlesha
    Cabel, Tim
    Nikolic-Jaric, Marija
    Salimi, Elham
    Braasch, Katrin
    Butler, Michael
    Bridges, Greg E.
    Thomson, Douglas J.
    [J]. 2013 IEEE INTERNATIONAL INSTRUMENTATION AND MEASUREMENT TECHNOLOGY CONFERENCE (I2MTC), 2013, : 1083 - 1087
  • [25] Learning from EMG: semi-automated grading of facial nerve function
    Holze, Magdalena
    Rensch, Leonhard
    Prell, Julian
    Scheller, Christian
    Simmermacher, Sebastian
    Scheer, Maximilian
    Strauss, Christian
    Rampp, Stefan
    [J]. JOURNAL OF CLINICAL MONITORING AND COMPUTING, 2022, 36 (05) : 1509 - 1517
  • [26] Semi-automated building extraction from CAD-based photogrammetry
    Yang, Ling
    Zhang, Jianqing
    [J]. CISP 2008: FIRST INTERNATIONAL CONGRESS ON IMAGE AND SIGNAL PROCESSING, VOL 2, PROCEEDINGS, 2008, : 407 - 411
  • [27] Semi-automated detection of anterior cruciate ligament injury from MRI
    Stajduhar, Ivan
    Mamula, Mihaela
    Miletic, Damir
    Uenal, Goezde
    [J]. COMPUTER METHODS AND PROGRAMS IN BIOMEDICINE, 2017, 140 : 151 - 164
  • [28] Semi-automated machines for manufacturing construction materials from plastic waste
    Mohan, H. T.
    Vishnu, R. S.
    Gautham, G.
    Jagadish, G.
    Shambunni, K.
    Shyamlal, S.
    Jayanarayanan, K.
    Mini, K. M.
    [J]. PROCEEDINGS OF THE INSTITUTION OF CIVIL ENGINEERS-WASTE AND RESOURCE MANAGEMENT, 2023, 176 (02) : 32 - 43
  • [29] Learning from EMG: semi-automated grading of facial nerve function
    Magdalena Holze
    Leonhard Rensch
    Julian Prell
    Christian Scheller
    Sebastian Simmermacher
    Maximilian Scheer
    Christian Strauss
    Stefan Rampp
    [J]. Journal of Clinical Monitoring and Computing, 2022, 36 : 1509 - 1517
  • [30] MAST (Movement Analysis Software for Telemetry data), for the semi-automated removal of false positives from radio telemetry data
    K. Nebiolo
    T. Castro-Santos
    [J]. Animal Biotelemetry, 10