content: package com.iast.astbenchmark.cases.engine.accuracy.trackTaintObject.fieldOrItemLevel.partFieldHasTaint;
  
  import java.io.IOException;
  import java.util.HashMap;
  import java.util.Map;
  
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RestController;
  
  import com.iast.astbenchmark.analyser.cache.IastTestCase;
  import com.iast.astbenchmark.analyser.cache.IastTestCaseDescriptor;
  import com.iast.astbenchmark.analyser.cache.IastTestCasePayloadProvider;
  import com.iast.astbenchmark.cases.bean.SourceTestObject;
  import com.iast.astbenchmark.common.CommonConsts;
  
  /**
  * Introduction 对象部分字段为污点，经过JDK序列化后再反序列化
  * Level X  
  * Date 2024-08-12
  * @author CC11001100 
  */
  @RestController
  
  // assession information start
  // real vulnerability = true
  // assession project = IAST引擎能力评估体系(JAVA) -> 准确度 -> 污点对象跟踪粒度 -> 字段/元素级别 -> 部分字段对象为污点 -> 对象部分字段为污点，经过JDK序列化后再反序列化
  // compose = AccuracyTrackTaintObject_SerializeDeSerialize_001_T.java && AccuracyTrackTaintObject_SerializeDeSerialize_002_T.java
  // bind_url = /case00142/2
  // assession information end
  public class AccuracyTrackTaintObject_SerializeDeSerialize_002_T
      implements IastTestCaseDescriptor, IastTestCasePayloadProvider {
  
      @PostMapping(value = "case00142/2")
      @IastTestCase(caseNo = "aTaintCase00142",
          caseFullName = "IAST引擎能力评估体系(JAVA)->准确度->污点对象跟踪粒度->字段/元素级别->部分字段对象为污点->对象部分字段为污点，经过JDK序列化后再反序列化",
          thisMethodTag = "aTaintCase00142_2", hasVul = true)
      public Map<String, Object> aTaintCase00142_2(@RequestBody SourceTestObject testObject) {
          Map<String, Object> modelMap = new HashMap<>();
          try {
              Runtime.getRuntime().exec(testObject.getCmd());
              modelMap.put("status", CommonConsts.SUCCESS_STR);
          } catch (IOException e) {
              modelMap.put("status", CommonConsts.ERROR_STR);
          }
          return modelMap;
      }
  
      @Override
      public IastTestCaseDescriptor followIastTestCaseDescriptor() {
          return new AccuracyTrackTaintObject_SerializeDeSerialize_001_T();
      }
  
      @Override
      public Object requestBodyBean() {
          SourceTestObject testObject = new SourceTestObject();
          testObject.setCmd("ls");
          testObject.setCmd2("cd /");
          return testObject;
      }
  
  }
  